Merged in share-services master

This commit is contained in:
alandavis
2021-05-05 19:43:50 +01:00
414 changed files with 22130 additions and 0 deletions

248
amps/share-services/pom.xml Normal file
View File

@@ -0,0 +1,248 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-share-services</artifactId>
<name>Alfresco Share Services AMP</name>
<description>Module to be applied to alfresco.war, containing APIs for Alfresco Share</description>
<packaging>amp</packaging>
<parent>
<artifactId>alfresco-share-parent</artifactId>
<groupId>org.alfresco</groupId>
<version>11.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
</exclusion>
<!-- SHA-2432 -->
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<scope>provided</scope>
</dependency>
<!-- Events dependencies -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-sync-events</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
</exclusion>
<!-- SHA-2432 -->
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-webscripts</artifactId>
<version>${dependency.webscripts.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${dependency.spring.version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<!-- SHA-2432 -->
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-jstlel</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<!-- AMP specific resources -->
<resource>
<directory>src/main/amp</directory>
<targetPath>../${project.build.finalName}</targetPath>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<!-- AMP specific resources needs to be on the classpath for test runs -->
<testResource>
<directory>src/main/amp/config</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Specification-Version>${version.major}.${version.minor}.${version.revision}</Specification-Version>
<Implementation-Version>${project.version}</Implementation-Version>
<Build-Date>${maven.build.timestamp}</Build-Date>
<Build-Name>${bamboo_planName}</Build-Name>
<Build-Key>${bamboo_fullBuildKey}</Build-Key>
<Build-Number>${bamboo_buildNumber}</Build-Number>
<Build-Revision>${bamboo_repository_revision_number}</Build-Revision>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<!-- No unit tests in this project - all tests are integration tests -->
<configuration>
<includes>
<include>nothing</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>integration-tests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<includes combine.self="override">
<include>**/*Test.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -0,0 +1,5 @@
#
# Disable load of sample site
#
sample.site.disabled=false

View File

@@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Share Service Module Bootstrap -->
<bean id="datalistModelBootstrap" parent="dictionaryModelBootstrap" depends-on="resourceBundles">
<property name="models">
<list>
<!-- Share Data Lists model -->
<value>alfresco/model/datalistModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/messages/data-list-model</value>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,315 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- -->
<!-- Slingshot Data List REST API -->
<!-- -->
<!-- For importing whole sites -->
<bean id="patch.siteLoadPatch.swsdp" class="org.alfresco.repo.admin.patch.impl.SiteLoadPatch" parent="basePatch">
<property name="id"><value>patch.siteLoadPatch.swsdp</value></property>
<property name="description"><value>patch.siteLoadPatch.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>${version.schema}</value></property>
<property name="targetSchema"><value>100000</value></property>
<property name="disabled"><value>${sample.site.disabled}</value></property>
<property name="dependsOn" >
<list>
<ref bean="patch.updateDmPermissions" />
</list>
</property>
<property name="spacesBootstrap" ref="siteLoadBootstrap-Spaces" />
<property name="usersBootstrap" ref="siteLoadBootstrap-Users" />
<property name="siteService" ref="siteService" />
<property name="descriptorService" ref="descriptorComponent" />
<property name="authorityService" ref="authorityService" />
<property name="behaviourFilter" ref="policyBehaviourFilter" />
<property name="siteName">
<value>swsdp</value>
</property>
<property name="bootstrapViews">
<map>
<entry key="users">
<props>
<prop key="location">alfresco/bootstrap/team-sample-sites/swsdp/Users.acp</prop>
</props>
</entry>
<entry key="people">
<props>
<prop key="location">alfresco/bootstrap/team-sample-sites/swsdp/People.acp</prop>
</props>
</entry>
<entry key="groups">
<props>
<prop key="location">alfresco/bootstrap/team-sample-sites/swsdp/Groups.txt</prop>
</props>
</entry>
<entry key="contents">
<props>
<prop key="location">alfresco/bootstrap/team-sample-sites/swsdp/Contents.acp</prop>
</props>
</entry>
</map>
</property>
</bean>
<!-- Download a datalist as Excel XLS / XLSX -->
<bean id="webscript.org.alfresco.slingshot.datalists.list.get"
class="org.alfresco.repo.web.scripts.datalist.DataListDownloadWebScript"
parent="declarativeSpreadsheetWebScript">
<property name="nodeService" ref="NodeService" />
<property name="siteService" ref="SiteService" />
<property name="namespaceService" ref="namespaceService" />
<property name="dictionaryService" ref="dictionaryService" />
<property name="modelOrder">
<!-- These are taken from the forms config for now -->
<map>
<entry key="dl:todoList">
<value>dl:todoTitle,dl:todoDueDate,dl:todoPriority,dl:todoStatus,dl:todoNotes,dl:assignee,dl:attachments</value>
</entry>
<entry key="dl:task">
<value>cm:title,cm:description,dl:ganttStartDate,dl:ganttEndDate,dl:taskAssignee,dl:taskPriority,dl:taskStatus,dl:ganttPercentComplete,dl:taskComments,cm:attachments</value>
</entry>
<entry key="dl:simpletask">
<value>cm:title,cm:description,dl:simpletaskDueDate,dl:simpletaskPriority,dl:simpletaskStatus,dl:simpletaskComments</value>
</entry>
<entry key="dl:contact">
<value>dl:contactFirstName,dl:contactLastName,dl:contactEmail,dl:contactCompany,dl:contactJobTitle,dl:contactPhoneOffice,dl:contactPhoneMobile,dl:contactNotes</value>
</entry>
<entry key="dl:issue">
<value>dl:issueID,cm:title,dl:issueAssignedTo,dl:issueStatus,dl:issuePriority,cm:description,dl:issueDueDate,dl:issueComments,cm:attachments</value>
</entry>
<entry key="dl:event">
<value>cm:title,cm:description,dl:eventLocation,dl:eventStartDate,dl:eventEndDate,dl:eventRegistrations,cm:attachments,dl:eventNote</value>
</entry>
<entry key="dl:location">
<value>cm:title,dl:locationAddress1,dl:locationAddress2,dl:locationAddress3,dl:locationZip,dl:locationState,dl:locationCountry,cm:description,cm:attachments</value>
</entry>
<entry key="dl:meetingAgenda">
<value>dl:meetingAgendaRef,cm:title,cm:description,dl:meetingAgendaTime,dl:meetingAgendaOwner,cm:attachments</value>
</entry>
<entry key="dl:eventAgenda">
<value>dl:eventAgendaRef,dl:eventAgendaStartTime,dl:eventAgendaEndTime,dl:eventAgendaSessionName,dl:eventAgendaPresenter,dl:eventAgendaAudience,cm:attachments,dl:eventAgendaNotes</value>
</entry>
</map>
</property>
</bean>
<!-- -->
<!-- Wiki Pages REST API -->
<!-- -->
<!-- abstract wiki web script -->
<bean id="abstractWikiWebScript" parent="webscript" abstract="true">
<property name="nodeService" ref="NodeService"/>
<property name="siteService" ref="SiteService"/>
<property name="wikiService" ref="WikiService"/>
<property name="personService" ref="PersonService"/>
<property name="activityService" ref="activityService"/>
</bean>
<!-- Fetches the details of one wiki page -->
<bean id="webscript.org.alfresco.slingshot.wiki.page.get"
class="org.alfresco.repo.web.scripts.wiki.WikiPageGet"
parent="abstractWikiWebScript">
</bean>
<!-- Fetches the contents of one wiki page at a specific version -->
<bean id="webscript.org.alfresco.slingshot.wiki.version.get"
class="org.alfresco.repo.web.scripts.wiki.WikiPageVersionGet"
parent="abstractWikiWebScript">
<property name="contentService" ref="ContentService" />
<property name="versionService" ref="VersionService" />
</bean>
<!-- Creates and Edits wiki pages -->
<bean id="webscript.org.alfresco.slingshot.wiki.page.put"
class="org.alfresco.repo.web.scripts.wiki.WikiPagePut"
parent="abstractWikiWebScript">
<property name="versionService" ref="VersionService" />
</bean>
<!-- Renames a wiki page (changing the title and name) -->
<bean id="webscript.org.alfresco.slingshot.wiki.move.post"
class="org.alfresco.repo.web.scripts.wiki.WikiPageMovePost"
parent="abstractWikiWebScript">
</bean>
<!-- Deletes a wiki page -->
<bean id="webscript.org.alfresco.slingshot.wiki.page.delete"
class="org.alfresco.repo.web.scripts.wiki.WikiPageDelete"
parent="abstractWikiWebScript">
</bean>
<!-- Lists the Wiki Pages for a site -->
<bean id="webscript.org.alfresco.slingshot.wiki.pagelist.get"
class="org.alfresco.repo.web.scripts.wiki.WikiPageListGet"
parent="abstractWikiWebScript">
<property name="sysAdminParams" ref="sysAdminParams" />
</bean>
<!-- Share Content Download - post of an Activity before performing a Site download action -->
<bean id="webscript.org.alfresco.slingshot.download.get" class="org.alfresco.slingshot.web.scripts.SlingshotContentGet" parent="webscript.org.alfresco.content.content.get">
<property name="siteService" ref="SiteService" />
<property name="poster" ref="activitiesPoster" />
<property name="transactionHelper" ref="retryingTransactionHelper" />
</bean>
<!-- Node browser web script -->
<bean id="webscript.org.alfresco.slingshot.node-browser.node-browser.get" parent="webscript"
class="org.alfresco.slingshot.web.scripts.NodeBrowserScript">
<property name="transactionService">
<ref bean="TransactionService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="dictionaryService">
<ref bean="DictionaryService" />
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="namespaceService">
<ref bean="NamespaceService" />
</property>
<property name="permissionService">
<ref bean="PermissionService" />
</property>
<property name="ownableService">
<ref bean="OwnableService" />
</property>
</bean>
<!-- AutoSuggest web script -->
<bean id="webscript.org.alfresco.slingshot.search.auto-suggest-search.get" class="org.alfresco.repo.web.scripts.search.AutoSuggestSearchGet" parent="webscript">
<property name="suggesterService" ref="suggesterService"/>
</bean>
<!-- Share URL webscript -->
<bean id="webscript.org.alfresco.repository.site.site-share-view-url.get" class="org.alfresco.repo.web.scripts.site.SiteShareViewUrlGet" parent="webscript">
<property name="nodeService" ref="NodeService"/>
<property name="siteService" ref="SiteService"/>
<property name="sysAdminParams" ref="sysAdminParams" />
<property name="dictionaryService" ref="DictionaryService"/>
</bean>
<!-- ============= -->
<!-- Wiki Services -->
<!-- ============= -->
<!-- The wiki service itself does not require any security restrictions, -->
<!-- they are imposed by the node and site services it uses to do its work. -->
<bean id="WikiService_security"
class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- The canned queries that the wiki services use do however need to check -->
<bean id="WikiService_CannedQuery_security"
class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor">
<property name="authenticationManager">
<ref bean="authenticationManager" />
</property>
<property name="accessDecisionManager">
<ref bean="accessDecisionManager" />
</property>
<property name="afterInvocationManager">
<ref bean="afterInvocationManager" />
</property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.wiki.WikiService.listWikiPages=ACL_ALLOW,AFTER_ACL_NODE.sys:base.ReadProperties
</value>
</property>
</bean>
<bean id="WikiService_security_listWikiPages"
class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean">
<property name="methodSecurityInterceptor" ref="WikiService_CannedQuery_security" />
<property name="service"
value="org.alfresco.service.cmr.wiki.WikiService" />
<property name="methodName" value="listWikiPages" />
</bean>
<!-- Wiki Service -->
<bean id="WikiService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.wiki.WikiService</value>
</property>
<property name="target">
<ref bean="wikiService" />
</property>
<property name="interceptorNames">
<list>
<idref bean="WikiService_transaction" />
<idref bean="AuditMethodInterceptor" />
<idref bean="exceptionTranslator" />
<idref bean="WikiService_security" />
</list>
</property>
</bean>
<!-- Wiki service transaction bean -->
<bean id="WikiService_transaction"
class="org.alfresco.repo.transaction.RetryingTransactionInterceptor">
<property name="transactionService">
<ref bean="TransactionService" />
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="get*">${server.transaction.mode.readOnly}</prop>
<prop key="list*">${server.transaction.mode.readOnly}</prop>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- List of Wiki Canned queries -->
<bean id="wikiCannedQueryRegistry" class="org.alfresco.util.registry.NamedObjectRegistry">
<property name="storageType" value="org.alfresco.query.CannedQueryFactory" />
</bean>
<!-- The regular GetChildren Auditable Canned Query Factory -->
<bean name="wikiGetChildrenCannedQueryFactory"
class="org.alfresco.repo.node.getchildren.GetChildrenAuditableCannedQueryFactory">
<property name="registry" ref="wikiCannedQueryRegistry" />
<property name="tenantService" ref="tenantService" />
<property name="nodeDAO" ref="nodeDAO" />
<property name="qnameDAO" ref="qnameDAO" />
<property name="cannedQueryDAO" ref="cannedQueryDAO" />
<property name="methodSecurity" ref="WikiService_security_listWikiPages" />
</bean>
<!-- Wiki Service base bean -->
<bean id="wikiService" class="org.alfresco.repo.wiki.WikiServiceImpl">
<property name="nodeDAO" ref="nodeDAO" />
<property name="nodeService" ref="NodeService" />
<property name="siteService" ref="SiteService" />
<property name="contentService" ref="ContentService" />
<property name="taggingService" ref="TaggingService" />
<property name="fileFolderService" ref="FileFolderService" />
<property name="transactionService" ref="transactionService" />
<property name="cannedQueryRegistry" ref="wikiCannedQueryRegistry" />
</bean>
<bean id="slingshotDocLibCustomResponse" parent="baseJavaScriptExtension" class="org.alfresco.repo.jscript.SlingshotDocLibCustomResponse">
<property name="extensionName">
<value>slingshotDocLib</value>
</property>
<property name="customResponses" ref="slingshotDocLibCustomResponsesMap" />
</bean>
<bean name="registerSlingshotCustomResponse" class="org.alfresco.repo.jscript.SlingshotDocLibCustomResponseRegistrar"
init-method="addCustomResponse" abstract="true">
<property name="responsesMap">
<ref bean="slingshotDocLibCustomResponsesMap" />
</property>
</bean>
</beans>

View File

@@ -0,0 +1,5 @@
module.id=${project.artifactId}
module.title=${project.name}
module.description=${project.description}
module.version=${version}
module.repo.version.min=6.1

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.jscript;
import org.alfresco.repo.jscript.app.CustomResponse;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import java.util.Map;
/**
* Populates DocLib webscript response with custom metadata output
*
* @author mikeh
*/
public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorExtension
{
private Map<String, Object> customResponses;
/**
* Set the custom response beans
*
* @param customResponses
*/
public void setCustomResponses(Map<String, Object> customResponses)
{
this.customResponses = customResponses;
}
/**
* Returns a JSON string to be added to the DocLib webscript response.
*
* @return The JSON string
*/
public String getJSON()
{
return this.getJSONObj().toString();
}
/**
* Returns a JSON object to be added to the DocLib webscript response.
*
* @return The JSON object
*/
protected Object getJSONObj()
{
JSONObject json = new JSONObject();
for (Map.Entry<String, Object> entry : this.customResponses.entrySet())
{
try
{
Serializable response = ((CustomResponse) entry.getValue()).populate();
json.put(entry.getKey(), response == null ? JSONObject.NULL: response);
}
catch (JSONException error)
{
error.printStackTrace();
}
}
return json;
}
}

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.jscript;
import java.util.Map;
/**
* Register an additional custom metadata output for the DocLib webscript response
*
* @author Will Abson
*/
public final class SlingshotDocLibCustomResponseRegistrar
{
private Map<String, Object> responsesMap;
private String key;
private Object value;
public String getKey()
{
return key;
}
public void setKey(String key)
{
this.key = key;
}
public Object getValue()
{
return value;
}
public void setValue(Object value)
{
this.value = value;
}
public Map<String, Object> getResponsesMap()
{
return responsesMap;
}
public void setResponsesMap(Map<String, Object> responsesMap)
{
this.responsesMap = responsesMap;
}
public void addCustomResponse()
{
responsesMap.put(key, value);
}
}

View File

@@ -0,0 +1,407 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.datalist;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import org.alfresco.model.ContentModel;
import org.alfresco.model.DataListModel;
import org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.namespace.InvalidQNameException;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.apache.commons.csv.CSVPrinter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* Data List Download
*
* Exports the contents of a Data List as an Excel file
*
* @author Nick Burch
*/
public class DataListDownloadWebScript extends DeclarativeSpreadsheetWebScript
implements InitializingBean
{
// Logger
private static final Log logger = LogFactory.getLog(DataListDownloadWebScript.class);
private static final QName DATA_LIST_ITEM_TYPE = DataListModel.PROP_DATALIST_ITEM_TYPE;
private NodeService nodeService;
private SiteService siteService;
private NamespaceService namespaceService;
private Map<QName,List<QName>> modelOrder;
private Map<String,String> rawModelOrder;
public DataListDownloadWebScript()
{
this.filenameBase = "DataListExport";
}
/**
* @param nodeService NodeService
*/
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
/**
* @param siteService SiteService
*/
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
/**
* @param namespaceService NamespaceService
*/
public void setNamespaceService(NamespaceService namespaceService)
{
this.namespaceService = namespaceService;
}
public void setModelOrder(Map<String,String> rawModelOrder)
{
this.rawModelOrder = rawModelOrder;
}
@Override
public void afterPropertiesSet() throws Exception {
modelOrder = new HashMap<QName, List<QName>>();
for(String key : rawModelOrder.keySet())
{
QName model;
List<QName> order = new ArrayList<QName>();
try
{
model= QName.createQName(key, namespaceService);
}
catch(InvalidQNameException e)
{
logger.warn("Skipping invalid model type " + key);
continue;
}
StringTokenizer st = new StringTokenizer(rawModelOrder.get(key), ",");
while(st.hasMoreTokens())
{
order.add( QName.createQName(st.nextToken(), namespaceService) );
}
modelOrder.put(model, order);
}
}
/**
* Identify the datalist
*/
@Override
protected Object identifyResource(String format, WebScriptRequest req) {
// Try to find the datalist they requested
NodeRef list;
Map<String,String> args = req.getServiceMatch().getTemplateVars();
if(args.get("store_type") != null)
{
list = new NodeRef(
args.get("store_type"),
args.get("store_id"),
args.get("id")
);
}
else
{
// Get the site
SiteInfo site = siteService.getSite(args.get("site"));
if(site == null)
{
throw new WebScriptException(Status.STATUS_NOT_FOUND, "Site not found with supplied name");
}
// Now find the data list container with in
NodeRef container = nodeService.getChildByName(
site.getNodeRef(),
ContentModel.ASSOC_CONTAINS,
args.get("container")
);
if(container == null)
{
throw new WebScriptException(Status.STATUS_NOT_FOUND, "Container not found within site");
}
// Now get the data list itself
list = nodeService.getChildByName(
container,
ContentModel.ASSOC_CONTAINS,
args.get("list")
);
}
if(list == null || !nodeService.exists(list))
{
throw new WebScriptException(Status.STATUS_NOT_FOUND, "The Data List could not be found");
}
return list;
}
/**
* We don't have a HTML version
*/
@Override
protected boolean allowHtmlFallback() {
return false;
}
/**
* Fetch the properties, in the requested order, from
* the data list definition
*/
@Override
protected List<Pair<QName, Boolean>> buildPropertiesForHeader(
Object resource, String format, WebScriptRequest req) {
NodeRef list = (NodeRef)resource;
QName type = buildType(list);
// Has the user given us rules for what to do
// with this type?
List<QName> props;
if(modelOrder.containsKey(type))
{
props = modelOrder.get(type);
}
else
{
// We'll have to try to guess it for them
// For now, just use DataList properties for the type
TypeDefinition typeDef = dictionaryService.getType(type);
Map<QName, PropertyDefinition> allProps = typeDef.getProperties();
props = new ArrayList<QName>();
for(QName prop : allProps.keySet())
{
if(NamespaceService.DATALIST_MODEL_1_0_URI.equals(prop.getNamespaceURI()))
{
props.add(prop);
}
}
}
// Everything is required
List<Pair<QName, Boolean>> properties = new ArrayList<Pair<QName,Boolean>>();
for(QName qname : props)
{
properties.add(new Pair<QName, Boolean>(qname, true));
}
return properties;
}
private QName buildType(NodeRef list)
{
String typeS = (String)nodeService.getProperty(list, DATA_LIST_ITEM_TYPE);
if(! typeS.startsWith(NamespaceService.DATALIST_MODEL_PREFIX + ":"))
{
throw new WebScriptException(Status.STATUS_NOT_IMPLEMENTED, "Unexpected list type " + typeS);
}
QName type = QName.createQName(NamespaceService.DATALIST_MODEL_1_0_URI, typeS.substring(typeS.indexOf(':')+1));
return type;
}
private List<NodeRef> getItems(NodeRef list)
{
Set<QName> typeSet = new HashSet<QName>(Arrays.asList(new QName[] { buildType(list) }));
List<NodeRef> items = new ArrayList<NodeRef>();
for(ChildAssociationRef ca : nodeService.getChildAssocs(list, typeSet))
{
items.add(ca.getChildRef());
}
return items;
}
@Override
protected void populateBody(Object resource, CSVPrinter csv,
List<QName> properties) throws IOException {
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "CSV not currently supported");
}
@Override
protected void populateBody(Object resource, Workbook workbook,
Sheet sheet, List<QName> properties) throws IOException {
NodeRef list = (NodeRef)resource;
List<NodeRef> items = getItems(list);
// Our various formats
DataFormat formatter = workbook.createDataFormat();
CellStyle styleInt = workbook.createCellStyle();
styleInt.setDataFormat( formatter.getFormat("0") );
CellStyle styleDate = workbook.createCellStyle();
styleDate.setDataFormat( formatter.getFormat("yyyy-mm-dd") );
CellStyle styleDouble = workbook.createCellStyle();
styleDouble.setDataFormat( formatter.getFormat("General") );
CellStyle styleNewLines = workbook.createCellStyle();
styleNewLines.setWrapText(true);
// Export the items
int rowNum = 1, colNum = 0;
for(NodeRef item : items)
{
Row r = sheet.createRow(rowNum);
colNum = 0;
for(QName prop : properties)
{
Cell c = r.createCell(colNum);
Serializable val = nodeService.getProperty(item, prop);
if(val == null)
{
// Is it an association, or just missing?
List<AssociationRef> assocs = nodeService.getTargetAssocs(item, prop);
if(assocs.size() > 0)
{
StringBuffer text = new StringBuffer();
int lines = 1;
for(AssociationRef ref : assocs)
{
NodeRef child = ref.getTargetRef();
QName type = nodeService.getType(child);
if(ContentModel.TYPE_PERSON.equals(type))
{
if(text.length() > 0) {
text.append('\n');
lines++;
}
text.append(nodeService.getProperty(
child, ContentModel.PROP_USERNAME
));
}
else if(ContentModel.TYPE_CONTENT.equals(type))
{
// TODO Link to the content
if(text.length() > 0) {
text.append('\n');
lines++;
}
text.append(nodeService.getProperty(
child, ContentModel.PROP_TITLE
));
}
else
{
System.err.println("TODO: handle " + type + " for " + child);
}
}
String v = text.toString();
c.setCellValue( v );
if(lines > 1)
{
c.setCellStyle(styleNewLines);
r.setHeightInPoints( lines*sheet.getDefaultRowHeightInPoints() );
}
}
else
{
// This property isn't set
c.setCellType(CellType.BLANK);
}
}
else
{
// Regular property, set
if(val instanceof String)
{
c.setCellValue((String)val);
}
else if(val instanceof Date)
{
c.setCellValue((Date)val);
c.setCellStyle(styleDate);
}
else if(val instanceof Integer || val instanceof Long)
{
double v = 0.0;
if(val instanceof Long) v = (double)(Long)val;
if(val instanceof Integer) v = (double)(Integer)val;
c.setCellValue(v);
c.setCellStyle(styleInt);
}
else if(val instanceof Float || val instanceof Double)
{
double v = 0.0;
if(val instanceof Float) v = (double)(Float)val;
if(val instanceof Double) v = (double)(Double)val;
c.setCellValue(v);
c.setCellStyle(styleDouble);
}
else
{
// TODO
System.err.println("TODO: handle " + val.getClass().getName() + " - " + val);
}
}
colNum++;
}
rowNum++;
}
// Sensible column widths please!
colNum = 0;
for(QName prop : properties)
{
sheet.autoSizeColumn(colNum);
colNum++;
}
}
}

View File

@@ -0,0 +1,113 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.search;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.service.cmr.search.SuggesterParameters;
import org.alfresco.service.cmr.search.SuggesterResult;
import org.alfresco.service.cmr.search.SuggesterService;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the <i>auto-suggest-search.get</i> web
* script.
*
* @author Jamal Kaabi-Mofrad
* @since 5.0
*/
public class AutoSuggestSearchGet extends DeclarativeWebScript
{
private static final Log logger = LogFactory.getLog(AutoSuggestSearchGet.class);
private static final String TERM = "t";
private static final String LIMIT = "limit";
private static final String SUGGESTIONS = "suggestions";
private SuggesterService suggesterService;
public void setSuggesterService(SuggesterService suggesterService)
{
this.suggesterService = suggesterService;
}
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
{
List<SearchSuggestionData> list = new ArrayList<>();
Map<String, Object> model = new HashMap<String, Object>(1);
model.put(SUGGESTIONS, list);
if (!suggesterService.isEnabled())
{
return model;
}
String term = req.getParameter(TERM);
int limit = getLimit(req.getParameter(LIMIT));
if (term == null || term.isEmpty())
{
return model;
}
SuggesterResult result = suggesterService.getSuggestions(new SuggesterParameters(term, limit, false));
List<Pair<String, Integer>> suggestedTerms = result.getSuggestions();
for (Pair<String, Integer> pair : suggestedTerms)
{
list.add(new SearchSuggestionData(pair.getFirst(), pair.getSecond()));
}
if (logger.isDebugEnabled())
{
logger.debug("Suggested terms for the [" + term + "] are: " + list);
}
return model;
}
private int getLimit(String limit)
{
if (limit == null)
{
return -1;
}
try
{
return Integer.parseInt(limit);
}
catch (NumberFormatException ne)
{
return -1;
}
}
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.search;
/**
* Basic POJO to represent a term suggestion.
*
* @author Jamal Kaabi-Mofrad
* @since 5.0
*/
public class SearchSuggestionData
{
private final String term;
private final int weight;
public SearchSuggestionData(String term, int weight)
{
this.term = term;
this.weight = weight;
}
public String getTerm()
{
return this.term;
}
public int getWeight()
{
return this.weight;
}
@Override
public String toString()
{
StringBuilder builder = new StringBuilder(100);
builder.append("SearchSuggestionData [term=").append(this.term).append(", weight=").append(this.weight)
.append("]");
return builder.toString();
}
}

View File

@@ -0,0 +1,273 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.site;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.model.DataListModel;
import org.alfresco.model.ForumModel;
import org.alfresco.repo.admin.SysAdminParams;
import org.alfresco.repo.calendar.CalendarModel;
import org.alfresco.repo.site.SiteModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.UrlUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* Returns the Share URL to view a given NodeRef.
*
* The supplied NodeRef must be within a Site, and must be
* of a type supported by Share
*
* @author Nick Burch
* @since 4.0.2
*/
public class SiteShareViewUrlGet extends DeclarativeWebScript
{
private static Log logger = LogFactory.getLog(SiteShareViewUrlGet.class);
protected NodeService nodeService;
protected SiteService siteService;
protected SysAdminParams sysAdminParams;
protected DictionaryService dictionaryService;
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
{
// Grab the NodeRef
String nodeRefS = req.getParameter("nodeRef");
if (nodeRefS == null)
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "NodeRef must be supplied");
if (! NodeRef.isNodeRef(nodeRefS))
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Invalid NodeRef");
// Check the node exists
NodeRef nodeRef = new NodeRef(nodeRefS);
if (! nodeService.exists(nodeRef))
throw new WebScriptException(Status.STATUS_NOT_FOUND, "Node Does Not Exist");
// Work out what site it's in, and what container in the site
SiteInfo site = null;
NodeRef siteContainer = null;
{
NodeRef current = nodeRef;
NodeRef prev = null;
while (current != null)
{
// Are we at a site yet?
QName type = nodeService.getType(current);
if (dictionaryService.isSubClass(type, SiteModel.TYPE_SITE))
{
// Found it!
siteContainer = prev;
site = siteService.getSite(current);
break;
}
// Step down
prev = current;
current = nodeService.getPrimaryParent(current).getParentRef();
}
}
if (site == null)
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Node isn't part of a site");
// Grab the main URL for the site
String baseUrl = getShareSiteRootStem(req, site);
// Identify the appropriate Share URL, based on the Node Type
QName nodeType = nodeService.getType(nodeRef);
// Start on the model
Map<String,Object> model = new HashMap<String, Object>();
model.put("node", nodeRef);
model.put("site", site);
model.put("type", nodeType);
// Get the URL, and we're done
String page = identifySharePage(nodeRef, site, siteContainer, nodeType);
model.put("url", baseUrl + page);
return model;
}
private static QName TYPE_LINK = QName.createQName(NamespaceService.LINKS_MODEL_1_0_URI, "link");
protected String identifySharePage(NodeRef nodeRef, SiteInfo site, NodeRef siteContainer, QName nodeType)
{
// Grab the name of the Node itself - often used for the URL
String name = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
// Wiki and Blog both use cm:content in special containers
if (siteContainer != null && dictionaryService.isSubClass(nodeType, ContentModel.TYPE_CONTENT))
{
QName containerName = nodeService.getPrimaryParent(siteContainer).getQName();
if (containerName.equals( QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "blog") ))
{
// Wiki - cm:content in folder called cm:wiki
return "wiki-page?title=" + name;
}
if (containerName.equals( QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "wiki") ))
{
// Blog - cm:content in cm:blog
return "blog-postview?postId=" + name;
}
}
// Is it a Data List?
if (dictionaryService.isSubClass(nodeType, DataListModel.TYPE_DATALIST))
{
return "data-lists?list=" + name;
}
// Is it a Link?
if (dictionaryService.isSubClass(nodeType, TYPE_LINK))
{
return "links-view?linkId=" + name;
}
// Is it a Calendar Entry?
if (dictionaryService.isSubClass(nodeType, CalendarModel.TYPE_EVENT))
{
// Find the date
Date date = (Date)nodeService.getProperty(nodeRef, CalendarModel.PROP_FROM_DATE);
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
// Build the URL based on it
return "calendar?date=" + fmt.format(date);
}
// Is it a discussions topic or post?
if (dictionaryService.isSubClass(nodeType, ForumModel.TYPE_TOPIC))
{
// Topic is easy
return "discussions-topicview?topicId=" + name;
}
if (dictionaryService.isSubClass(nodeType, ForumModel.TYPE_POST))
{
// Go from post to the topic, then list from there
NodeRef postTopic = nodeService.getPrimaryParent(nodeRef).getParentRef();
String topicName = (String)nodeService.getProperty(postTopic, ContentModel.PROP_NAME);
return "discussions-topicview?topicId=" + topicName;
}
// Is it just regular content?
if (dictionaryService.isSubClass(nodeType, ContentModel.TYPE_CONTENT))
{
// Simple, Document Details with a noderef
return "document-details?nodeRef=" + nodeRef.toString();
}
// Is it a normal folder?
if (dictionaryService.isSubClass(nodeType, ContentModel.TYPE_FOLDER))
{
// Need the path within the site
List<String> paths = new ArrayList<String>();
NodeRef current = nodeRef;
while (current != null && !current.equals(siteContainer) && !current.equals(site.getNodeRef()))
{
paths.add( (String)nodeService.getProperty(current, ContentModel.PROP_NAME) );
current = nodeService.getPrimaryParent(current).getParentRef();
}
// Invert to build the path
StringBuilder path = new StringBuilder();
for (int i=paths.size()-1; i>=0; i--)
{
path.append('/');
path.append(paths.get(i));
}
if (path.length() > 0)
{
// Becomes documentlibrary?path=/Docs/Beta
return "documentlibrary?path=" + path.toString();
}
else
{
// Just the root of the document library
return "documentlibrary";
}
}
// If we can't work out what it is, log and take them to the site dashboard
if (logger.isDebugEnabled())
logger.debug("COuldn't identify specific URL for Node " + nodeRef + " of type " + nodeType);
return "dashboard";
}
/**
* Returns the root of the Share Site pages for a given site, eg
* https://test.alfresco.com/share/page/site/test-site/
*/
protected String getShareSiteRootStem(WebScriptRequest req, SiteInfo site)
{
return getShareRootUrl(req) + "page/site/" + site.getShortName() + "/";
}
/**
* Returns the root of the Share WebApp, eg
* http://localhost:8081/share/
*/
protected String getShareRootUrl(WebScriptRequest req)
{
return UrlUtil.getShareUrl(sysAdminParams) + "/";
}
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setSysAdminParams(SysAdminParams sysAdminParams)
{
this.sysAdminParams = sysAdminParams;
}
public void setDictionaryService(DictionaryService dictionaryService)
{
this.dictionaryService = dictionaryService;
}
}

View File

@@ -0,0 +1,306 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.query.PagingRequest;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.service.cmr.activities.ActivityService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.NoSuchPersonException;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.alfresco.service.cmr.wiki.WikiService;
import org.alfresco.util.ScriptPagingDetails;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.springframework.extensions.surf.util.URLEncoder;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.json.JSONWriter;
/**
* @author Nick Burch
* @since 4.0
*/
public abstract class AbstractWikiWebScript extends DeclarativeWebScript
{
public static final String WIKI_SERVICE_ACTIVITY_APP_NAME = "wiki";
/**
* When no maximum or paging info is given, what should we use?
*/
protected static final int MAX_QUERY_ENTRY_COUNT = 1000;
private static Log logger = LogFactory.getLog(AbstractWikiWebScript.class);
// Injected services
protected NodeService nodeService;
protected SiteService siteService;
protected WikiService wikiService;
protected PersonService personService;
protected ActivityService activityService;
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setWikiService(WikiService wikiService)
{
this.wikiService = wikiService;
}
public void setPersonService(PersonService personService)
{
this.personService = personService;
}
public void setActivityService(ActivityService activityService)
{
this.activityService = activityService;
}
protected String getOrNull(JSONObject json, String key)
{
if (json.containsKey(key))
{
return (String)json.get(key);
}
return null;
}
/**
* Builds up a listing Paging request, based on the arguments
* specified in the URL
*/
protected PagingRequest buildPagingRequest(WebScriptRequest req)
{
return new ScriptPagingDetails(req, MAX_QUERY_ENTRY_COUNT);
}
protected void addActivityEntry(String event, WikiPageInfo wikiPage, SiteInfo site,
WebScriptRequest req, JSONObject json)
{
addActivityEntry(event, wikiPage, site, req, json, Collections.<String, String>emptyMap());
}
/**
* Generates an activity entry for the link
*
* @param event a String representing the event.
* @param wikiPage the wiki page generating the activity.
* @param site the site in which the wiki page was created.
* @param req the {@link WebScriptRequest}.
* @param json JSONObject
* @param additionalData any additional data required for the activity.
*/
protected void addActivityEntry(String event,
WikiPageInfo wikiPage, SiteInfo site,
WebScriptRequest req, JSONObject json,
Map<String, String> additionalData)
{
// What page is this for?
String page = req.getParameter("page");
if (page == null && json != null)
{
if (json.containsKey("page"))
{
page = (String)json.get("page");
}
}
if (page == null)
{
// Default
page = "wiki";
}
try
{
StringWriter activityJson = new StringWriter();
JSONWriter activity = new JSONWriter(activityJson);
activity.startObject();
activity.writeValue("title", wikiPage.getTitle());
activity.writeValue("page", page + "?title=" + URLEncoder.encodeUriComponent(wikiPage.getTitle()));
for (Map.Entry<String, String> entry : additionalData.entrySet())
{
activity.writeValue(entry.getKey(), entry.getValue());
}
activity.endObject();
activityService.postActivity(
"org.alfresco.wiki.page-" + event,
site.getShortName(),
WIKI_SERVICE_ACTIVITY_APP_NAME,
activityJson.toString());
}
catch (Exception e)
{
// Warn, but carry on
logger.warn("Error adding wiki page " + event + " to activities feed", e);
}
}
protected NodeRef personForModel(String username)
{
if (username == null || username.isEmpty())
{
return null;
}
try
{
// Will turn into a Script Node needed of the person
return personService.getPerson(username);
}
catch(NoSuchPersonException e)
{
// This is normally caused by the person having been deleted
return null;
}
}
protected Map<String, Object> renderWikiPage(WikiPageInfo page)
{
Map<String, Object> res = new HashMap<>();
res.put("page", page);
res.put("node", page.getNodeRef());
res.put("name", page.getSystemName());
res.put("title", page.getTitle());
res.put("contents", page.getContents());
res.put("tags", page.getTags());
// Both forms used for dates
res.put("createdOn", page.getCreatedAt());
res.put("modifiedOn", page.getModifiedAt());
res.put("created", page.getCreatedAt());
res.put("modified", page.getModifiedAt());
// For most things, we want blank instead of null
for (Map.Entry<String, Object> entry : res.entrySet())
{
if (entry.getValue() == null) entry.setValue("");
}
// FTL needs a script node of the people, or null if unavailable
res.put("createdBy", personForModel(page.getCreator()));
res.put("modifiedBy", personForModel(page.getModifier()));
// All done
return res;
}
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req,
Status status, Cache cache)
{
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
if (templateVars == null)
{
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "No parameters supplied");
}
// Parse the JSON, if supplied
JSONObject json = null;
String contentType = req.getContentType();
if (contentType != null && contentType.indexOf(';') != -1)
{
contentType = contentType.substring(0, contentType.indexOf(';'));
}
if (MimetypeMap.MIMETYPE_JSON.equals(contentType))
{
JSONParser parser = new JSONParser();
try
{
json = (JSONObject)parser.parse(req.getContent().getContent());
}
catch (IOException | ParseException io)
{
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Invalid JSON: " + io.getMessage());
}
}
// Get the site short name. Try quite hard to do so...
String siteName = templateVars.get("siteId");
if (siteName == null)
{
siteName = req.getParameter("site");
}
if (siteName == null && json != null)
{
if (json.containsKey("siteid"))
{
siteName = (String)json.get("siteid");
}
else if (json.containsKey("siteId"))
{
siteName = (String)json.get("siteId");
}
else if(json.containsKey("site"))
{
siteName = (String)json.get("site");
}
}
if (siteName == null)
{
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "No site given");
}
// Grab the requested site
SiteInfo site = siteService.getSite(siteName);
if (site == null)
{
String error = "Could not find site: " + siteName;
throw new WebScriptException(Status.STATUS_NOT_FOUND, error);
}
String pageTitle = templateVars.get("pageTitle");
// Have the real work done
return executeImpl(site, pageTitle, req, json, status, cache);
}
protected abstract Map<String, Object> executeImpl(SiteInfo site,
String pageTitle, WebScriptRequest req, JSONObject json,
Status status, Cache cache);
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page listing page.delete webscript.
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPageDelete extends AbstractWikiWebScript
{
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
Map<String, Object> model = new HashMap<String, Object>();
// Try to find the page
WikiPageInfo page = wikiService.getWikiPage(site.getShortName(), pageTitle);
if (page == null)
{
String message = "The Wiki Page could not be found";
throw new WebScriptException(Status.STATUS_NOT_FOUND, message);
}
// Have the page deleted
wikiService.deleteWikiPage(page);
// Generate an activity for this
addActivityEntry("deleted", page, site, req, json);
// Mark it as gone
status.setCode(Status.STATUS_NO_CONTENT);
return model;
}
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.apache.commons.lang.StringEscapeUtils;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page fetching page.get webscript.
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPageGet extends AbstractWikiWebScript
{
private static final String MSG_NOT_FOUND= "page-not-found";
// For matching links. Not the best pattern ever...
private static final Pattern LINK_PATTERN = Pattern.compile("\\[\\[([^\\|#\\]]+)");
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
String strMinWikiData = req.getParameter("minWikiData");
boolean minWikiData = strMinWikiData != null ? Boolean.parseBoolean(strMinWikiData) : false;
final ResourceBundle rb = getResources();
Map<String, Object> model = new HashMap<>();
// Try to find the page
WikiPageInfo page = wikiService.getWikiPage(site.getShortName(), pageTitle);
if (page == null)
{
String message = "The Wiki Page could not be found";
status.setCode(Status.STATUS_NOT_FOUND);
status.setMessage(message);
status.setRedirect(true);
// MNT-11595 Downgrading permission from Manager to Consumer, user still allowed to create WIKI pages
// Record these
model.put("container", site.getNodeRef());
model.put("error", rb.getString(MSG_NOT_FOUND));
// Bail out
return model;
}
// Identify all the internal page links, valid and not
// TODO This may be a candidate for the service in future
List<String> links = new ArrayList<>();
List<String> pageTitles = new ArrayList<>();
if (page.getContents() != null)
{
Matcher m = LINK_PATTERN.matcher(page.getContents());
while (m.find())
{
String link = m.group(1);
if (! links.contains(link))
{
links.add(link);
// build the list of available pages
WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml(link));
if (wikiPage != null)
{
pageTitles.add(wikiPage.getTitle());
}
}
}
}
// All done
model.put("page", page);
model.put("node", page.getNodeRef());
model.put("container", page.getContainerNodeRef());
model.put("links", links);
model.put("pageList", pageTitles);
model.put("tags", page.getTags());
model.put("siteId", site.getShortName());
model.put("site", site);
model.put("minWikiData", minWikiData);
// Double wrap
Map<String, Object> result = new HashMap<>();
result.put("result", model);
return result;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.query.PagingRequest;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.admin.SysAdminParams;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.wiki.WikiServiceImpl;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.TemplateService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.alfresco.util.UrlUtil;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page listing pagelist.get webscript.
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPageListGet extends AbstractWikiWebScript
{
protected static final int RECENT_SEARCH_PERIOD_DAYS = 7;
protected static final long ONE_DAY_MS = 24*60*60*1000;
// Injected services
private SysAdminParams sysAdminParams;
public void setSysAdminParams(SysAdminParams sysAdminParams)
{
this.sysAdminParams = sysAdminParams;
}
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
// Decide on what kind of request they wanted
String filter = req.getParameter("filter");
String strPageMetaOnly = req.getParameter("pageMetaOnly");
boolean pageMetaOnly = strPageMetaOnly != null ? Boolean.parseBoolean(strPageMetaOnly) : false;
// User?
boolean userFiltering = false;
String user = null;
if ("user".equals(filter) || "myPages".equals(filter))
{
userFiltering = true;
user = AuthenticationUtil.getFullyAuthenticatedUser();
}
// Date?
boolean dateFiltering = false;
boolean dateIsCreated = true;
Date from = null;
Date to = null;
if ("recentlyAdded".equals(filter) ||
"recentlyCreated".equals(filter) ||
"recentlyModified".equals(filter))
{
dateFiltering = true;
if ("recentlyModified".equals(filter))
{
dateIsCreated = false;
}
int days = RECENT_SEARCH_PERIOD_DAYS;
String daysS = req.getParameter("days");
if (daysS != null && daysS.length() > 0)
{
days = Integer.parseInt(daysS);
}
Date now = new Date();
from = new Date(now.getTime() - days*ONE_DAY_MS);
to = new Date(now.getTime() + ONE_DAY_MS);
}
// Get the links for the list
PagingRequest paging = buildPagingRequest(req);
PagingResults<WikiPageInfo> pages;
if (userFiltering)
{
pages = wikiService.listWikiPages(site.getShortName(), user, paging);
}
else if (dateFiltering)
{
if (dateIsCreated)
{
pages = wikiService.listWikiPagesByCreated(site.getShortName(), from, to, paging);
}
else
{
pages = wikiService.listWikiPagesByModified(site.getShortName(), from, to, paging);
}
}
else
{
pages = wikiService.listWikiPages(site.getShortName(), paging);
}
// For each one in our page, grab details of any ignored instances
List<Map<String,Object>> items = new ArrayList<Map<String,Object>>();
for (WikiPageInfo page : pages.getPage())
{
Map<String, Object> result = renderWikiPage(page);
items.add(result);
}
Map<String, Object> data = new HashMap<String, Object>();
data.put("pages", items);
data.put("pageSize", paging.getMaxItems());
data.put("startIndex", paging.getSkipCount());
data.put("itemCount", items.size());
int total = items.size();
if (pages.getTotalResultCount() != null && pages.getTotalResultCount().getFirst() != null)
{
total = pages.getTotalResultCount().getFirst();
}
data.put("total", total);
// We need the container node for permissions checking
NodeRef container;
if (pages.getPage().size() > 0)
{
container = pages.getPage().get(0).getContainerNodeRef();
}
else
{
// Find the container (if it's been created yet)
container = siteService.getContainer(
site.getShortName(), WikiServiceImpl.WIKI_COMPONENT);
if (container == null)
{
// Brand new site, no write operations on links have happened
// Fudge it for now with the site itself, the first write call
// will have the container created
container = site.getNodeRef();
}
}
// All done
Map<String, Object> wiki = new HashMap<String, Object>();
wiki.put("pages", items); // Old style
wiki.put("container", container);
if (userFiltering)
{
// We need to get all the wiki pages for "My Pages" filter otherwise
// the links for renamed wiki pages won't be rendered correctly,
// which were created by other users
pages = wikiService.listWikiPages(site.getShortName(), paging);
List<String> pageTitles = new ArrayList<String>(pages.getPage().size());
for (WikiPageInfo page : pages.getPage())
{
pageTitles.add(page.getTitle());
}
wiki.put("pageTitles", pageTitles);
}
Map<String, Object> model = new HashMap<String, Object>();
model.put("data", data); // New style
model.put("wiki", wiki);
model.put("siteId", site.getShortName());
model.put("site", site);
model.put(TemplateService.KEY_SHARE_URL, UrlUtil.getShareUrl(sysAdminParams));
model.put("pageMetaOnly", pageMetaOnly);
return model;
}
}

View File

@@ -0,0 +1,119 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;
import org.alfresco.service.cmr.model.FileExistsException;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page renaming move.post webscript.
*
* TODO Track links to pages, so we can avoid creating the "This page has been moved"
* stubs as now, for cases where nothing links to the page being renamed. (ALF-3844)
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPageMovePost extends AbstractWikiWebScript
{
private static final String MSG_MOVED = "page-moved";
private static final String MSG_MOVED_HERE = "page-moved-here";
private static final String MSG_NOT_FOUND= "page-not-found";
// The 'custom0' key here refers to the org.alfresco.wiki.page-renamed {2} in activity-list.get.properties
private static final String OLD_TITLE_KEY = "custom0";
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
final Map<String, Object> model = new HashMap<String, Object>();
final ResourceBundle rb = getResources();
// Try to find the page we're renaming
WikiPageInfo page = wikiService.getWikiPage(site.getShortName(), pageTitle);
if (page == null)
{
String message = "The Wiki Page could not be found";
status.setCode(Status.STATUS_NOT_FOUND);
status.setMessage(message);
// Wrap and bail
model.put("error", rb.getString(MSG_NOT_FOUND));
Map<String, Object> result = new HashMap<String, Object>();
result.put("result", model);
return result;
}
// Grab the new Title
// The "name" in the JSON is actually the title!
String newTitle = (String)json.get("name");
// Have the page re-named, if possible
String oldTitle = page.getTitle().length() == 0 ? pageTitle : page.getTitle();
try
{
page.setTitle(newTitle);
page = wikiService.updateWikiPage(page);
}
catch (FileExistsException e)
{
throw new WebScriptException(Status.STATUS_CONFLICT, "Duplicate page name");
}
// Create the "This page has been moved" entry for the old page
String movedContent = rb.getString(MSG_MOVED) + " [[" + page.getTitle() +
"|" + rb.getString(MSG_MOVED_HERE) + "]].";
wikiService.createWikiPage(site.getShortName(), oldTitle, movedContent);
Map<String, String> additionalData = new HashMap<String, String>();
additionalData.put(OLD_TITLE_KEY, oldTitle);
// Add an activity entry for the rename
addActivityEntry("renamed", page, site, req, json, additionalData);
// All done
model.put("name", page.getSystemName());
model.put("title", page.getTitle());
model.put("page", page);
model.put("siteId", site.getShortName());
model.put("site", site);
// Double wrap
Map<String, Object> result = new HashMap<String, Object>();
result.put("result", model);
return result;
}
}

View File

@@ -0,0 +1,191 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.service.cmr.version.VersionService;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.alfresco.service.namespace.QName;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page creating/editing page.put webscript.
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPagePut extends AbstractWikiWebScript
{
// Implementation note: the wiki page webscripts do not follow the standard Alfresco convention whereby
// POST = CREATE and PUT = UPDATE.
// In this case, put is used for both create and update.
private VersionService versionService;
public void setVersionService(VersionService versionService)
{
this.versionService = versionService;
}
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
Map<String, Object> model = new HashMap<>();
// Grab the details of the change
// Fetch the contents
String contents = (String)json.get("pagecontent");
// Fetch the title, used only when creating
String title;
if (json.containsKey("title"))
{
title = (String)json.get("title");
}
else
{
title = pageTitle;
}
// Fetch the versioning details
boolean forceSave = json.containsKey("forceSave");
String currentVersion = null;
if (json.containsKey("currentVersion"))
{
currentVersion = (String)json.get("currentVersion");
}
// Fetch the tags, if given
List<String> tags = null;
if (json.containsKey("tags"))
{
tags = new ArrayList<>();
if (!json.get("tags").equals(""))
{
// Array of tags
JSONArray tagsA = (JSONArray)json.get("tags");
for (int i=0; i<tagsA.size(); i++)
{
tags.add((String)tagsA.get(i));
}
}
}
// Are we creating or editing?
WikiPageInfo page = wikiService.getWikiPage(site.getShortName(), pageTitle);
if (page == null)
{
// Create the page
page = wikiService.createWikiPage(site.getShortName(), title, contents);
// Add tags if given
if (tags != null && !tags.isEmpty())
{
page.getTags().addAll(tags);
wikiService.updateWikiPage(page);
}
// Make it versioned
makeVersioned(page);
// Generate the activity
addActivityEntry("created", page, site, req, json);
}
else
{
// Updating, check about versioning first
if (forceSave || pageVersionMatchesSubmitted(page, currentVersion))
{
// Update the page
page.setContents(contents);
if (tags != null)
{
page.getTags().clear();
page.getTags().addAll(tags);
}
wikiService.updateWikiPage(page);
}
else
{
// Editing the wrong version
String message = "Repository version is newer.";
throw new WebScriptException(Status.STATUS_CONFLICT, message);
}
// Generate the activity
addActivityEntry("edited", page, site, req, json);
}
// All done
model.put("page", page);
model.put("site", site);
model.put("siteId", site.getShortName());
// Double wrap
Map<String, Object> result = new HashMap<>();
result.put("result", model);
return result;
}
private boolean pageVersionMatchesSubmitted(WikiPageInfo page, String currentVersion)
{
// If they didn't give version, it can't be right
if (currentVersion == null)
{
return false;
}
// Grab the current version
Version version = versionService.getCurrentVersion(page.getNodeRef());
if (version == null)
{
// It should be versioned already, fix that
makeVersioned(page);
// Wasn't versioned before, so can't detect conflict
return true;
}
return version.getVersionLabel().equals(currentVersion);
}
private void makeVersioned(WikiPageInfo page)
{
Map<QName,Serializable> versionProps = new HashMap<>();
versionProps.put(ContentModel.PROP_AUTO_VERSION, true);
versionProps.put(ContentModel.PROP_AUTO_VERSION_PROPS, true);
versionService.ensureVersioningEnabled(page.getNodeRef(), versionProps);
}
}

View File

@@ -0,0 +1,170 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts.wiki;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.AspectMissingException;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.service.cmr.version.VersionDoesNotExistException;
import org.alfresco.service.cmr.version.VersionHistory;
import org.alfresco.service.cmr.version.VersionService;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.json.simple.JSONObject;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* This class is the controller for the wiki page version fetching version.get webscript.
*
* @author Nick Burch
* @since 4.0
*/
public class WikiPageVersionGet extends AbstractWikiWebScript
{
// For spotting if a version string is an ID or a Label
private static final Pattern LABEL_PATTERN = Pattern.compile("\\d+\\.\\d+");
private static final String PARAM_CONTENT = "content";
private ContentService contentService;
private VersionService versionService;
public void setVersionService(VersionService versionService)
{
this.versionService = versionService;
}
public void setContentService(ContentService contentService)
{
this.contentService = contentService;
}
@Override
protected Map<String, Object> executeImpl(SiteInfo site, String pageTitle,
WebScriptRequest req, JSONObject json, Status status, Cache cache)
{
Map<String, Object> model = new HashMap<>();
// Grab the version string
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
String versionId = templateVars.get("versionId");
if (versionId == null)
{
String error = "No versionId supplied";
throw new WebScriptException(Status.STATUS_BAD_REQUEST, error);
}
// Try to find the page
WikiPageInfo page = wikiService.getWikiPage(site.getShortName(), pageTitle);
if (page == null)
{
String message = "The Wiki Page could not be found";
status.setCode(Status.STATUS_NOT_FOUND);
status.setMessage(message);
// Return an empty string though
model.put(PARAM_CONTENT, "");
return model;
}
// Fetch the version history for the node
VersionHistory versionHistory = null;
Version version = null;
try
{
versionHistory = versionService.getVersionHistory(page.getNodeRef());
}
catch (AspectMissingException e) {}
if (versionHistory == null)
{
// Not been versioned, return an empty string
model.put(PARAM_CONTENT, "");
return model;
}
// Fetch the version by either ID or Label
Matcher m = LABEL_PATTERN.matcher(versionId);
if (m.matches())
{
// It's a version label like 2.3
try
{
version = versionHistory.getVersion(versionId);
}
catch (VersionDoesNotExistException e) {}
}
else
{
// It's a version ID like ed00bac1-f0da-4042-8598-45a0d39cb74d
// (The ID is usually part of the NodeRef of the frozen node, but we
// don't assume to be able to just generate the full NodeRef)
for (Version v : versionHistory.getAllVersions())
{
if (v.getFrozenStateNodeRef().getId().equals(versionId))
{
version = v;
}
}
}
// Did we find the right version in the end?
String contents;
if (version != null)
{
ContentReader reader = contentService.getReader(version.getFrozenStateNodeRef(), ContentModel.PROP_CONTENT);
if (reader != null)
{
contents = reader.getContentString();
}
else
{
// No content was stored in the version history
contents = "";
}
}
else
{
// No warning of the missing version, just return an empty string
contents = "";
}
// All done
model.put(PARAM_CONTENT, contents);
model.put("page", page);
model.put("site", site);
model.put("siteId", site.getShortName());
return model;
}
}

View File

@@ -0,0 +1,162 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.wiki;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
/**
* An implementation of {@link WikiPageInfo}
*
* @author Nick Burch (based on existing webscript controllers in the REST API)
* @since 4.0
*/
public class WikiPageInfoImpl implements WikiPageInfo
{
private NodeRef nodeRef;
private NodeRef containerNodeRef;
private String systemName;
private String title;
private String contents;
private String creator;
private String modifier;
private Date createdAt;
private Date modifiedAt;
private List<String> tags = new ArrayList<String>();
/**
* Creates a new, empty WikiPageInfo
*/
public WikiPageInfoImpl()
{
}
/**
* Create a WikiPageInfo object from an existing node
*/
public WikiPageInfoImpl(NodeRef nodeRef, NodeRef containerNodeRef, String systemName)
{
this.nodeRef = nodeRef;
this.containerNodeRef = containerNodeRef;
this.systemName = systemName;
}
@Override
public NodeRef getContainerNodeRef()
{
return containerNodeRef;
}
@Override
public NodeRef getNodeRef()
{
return nodeRef;
}
@Override
public String getSystemName()
{
return systemName;
}
@Override
public String getTitle()
{
return title;
}
@Override
public String getContents()
{
return contents;
}
@Override
public String getCreator()
{
return creator;
}
@Override
public String getModifier()
{
return modifier;
}
@Override
public Date getCreatedAt()
{
return createdAt;
}
@Override
public Date getModifiedAt()
{
return modifiedAt;
}
@Override
public List<String> getTags()
{
return tags;
}
@Override
public void setTitle(String title)
{
this.title = title;
}
@Override
public void setContents(String contents)
{
this.contents = contents;
}
public void setCreator(String creator)
{
this.creator = creator;
}
public void setModifier(String modifier)
{
this.modifier = modifier;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public void setModifiedAt(Date modifiedAt)
{
this.modifiedAt = modifiedAt;
}
public void setTags(List<String> tags)
{
this.tags = tags;
}
}

View File

@@ -0,0 +1,410 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.wiki;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.query.CannedQueryFactory;
import org.alfresco.query.CannedQueryResults;
import org.alfresco.query.CannedQuerySortDetails;
import org.alfresco.query.EmptyPagingResults;
import org.alfresco.query.PagingRequest;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.domain.node.NodeDAO;
import org.alfresco.repo.node.getchildren.GetChildrenAuditableCannedQuery;
import org.alfresco.repo.node.getchildren.GetChildrenAuditableCannedQueryFactory;
import org.alfresco.repo.query.NodeBackedEntity;
import org.alfresco.repo.site.SiteServiceImpl;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.model.FileNotFoundException;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.tagging.TaggingService;
import org.alfresco.service.cmr.wiki.WikiPageInfo;
import org.alfresco.service.cmr.wiki.WikiService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.Pair;
import org.alfresco.util.registry.NamedObjectRegistry;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @author Nick Burch (based on existing webscript controllers in the REST API)
* @since 4.0
*/
public class WikiServiceImpl implements WikiService
{
public static final String WIKI_COMPONENT = "wiki";
protected static final String CANNED_QUERY_GET_CHILDREN = "wikiGetChildrenCannedQueryFactory";
/**
* The logger
*/
@SuppressWarnings("unused")
private static Log logger = LogFactory.getLog(WikiServiceImpl.class);
private NodeDAO nodeDAO;
private NodeService nodeService;
private SiteService siteService;
private ContentService contentService;
private TaggingService taggingService;
private FileFolderService fileFolderService;
private TransactionService transactionService;
private NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry;
public void setNodeDAO(NodeDAO nodeDAO)
{
this.nodeDAO = nodeDAO;
}
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setContentService(ContentService contentService)
{
this.contentService = contentService;
}
public void setTaggingService(TaggingService taggingService)
{
this.taggingService = taggingService;
}
public void setFileFolderService(FileFolderService fileFolderService)
{
this.fileFolderService = fileFolderService;
}
public void setTransactionService(TransactionService transactionService)
{
this.transactionService = transactionService;
}
/**
* Set the registry of {@link CannedQueryFactory canned queries}
*/
public void setCannedQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry)
{
this.cannedQueryRegistry = cannedQueryRegistry;
}
/**
* Fetches the Wiki Container on a site, creating as required if requested.
*/
protected NodeRef getSiteWikiContainer(final String siteShortName, boolean create)
{
return SiteServiceImpl.getSiteContainer(
siteShortName, WIKI_COMPONENT, create,
siteService, transactionService, taggingService);
}
/**
* Turns a Title into a Page Name.
*/
private static String buildName(String title)
{
// The name is based on the title, but with underscores
String name = title.replace(' ', '_');
name = name.replaceAll("\"", "%22");
name = name.replaceAll("[*]", "%2a");
name = name.replaceAll("<", "%3c");
name = name.replaceAll(">", "%3e");
name = name.replaceAll(":", "%3a");
name = name.replaceAll("([.]?[.]+$)", "%2e");
return name;
}
private WikiPageInfo buildPage(NodeRef nodeRef, NodeRef container, String name, String preLoadedContents)
{
WikiPageInfoImpl page = new WikiPageInfoImpl(nodeRef, container, name);
// Grab all the properties, we need the bulk of them anyway
Map<QName,Serializable> props = nodeService.getProperties(nodeRef);
// Start with the auditable properties
page.setCreator((String)props.get(ContentModel.PROP_CREATOR));
page.setModifier((String)props.get(ContentModel.PROP_MODIFIER));
page.setCreatedAt((Date)props.get(ContentModel.PROP_CREATED));
page.setModifiedAt((Date)props.get(ContentModel.PROP_MODIFIED));
// Now the wiki ones
page.setTitle(((String)props.get(ContentModel.PROP_TITLE)).replaceAll(" ", "_"));
// Finally, do the content
String contents = preLoadedContents;
if (contents == null)
{
ContentReader reader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);
if (reader != null)
{
contents = reader.getContentString();
}
}
page.setContents(contents);
// Finally tags
page.setTags(taggingService.getTags(nodeRef));
// All done
return page;
}
@Override
public WikiPageInfo getWikiPage(String siteShortName, String pageTitle)
{
NodeRef container = getSiteWikiContainer(siteShortName, false);
if (container == null)
{
// No links
return null;
}
String pageName = buildName(pageTitle);
NodeRef link = nodeService.getChildByName(container, ContentModel.ASSOC_CONTAINS, pageName);
if (link != null)
{
return buildPage(link, container, pageName, null);
}
return null;
}
@Override
public WikiPageInfo createWikiPage(String siteShortName, String title,
String content)
{
// Grab the location to store in
NodeRef container = getSiteWikiContainer(siteShortName, true);
// Build the name
String name = buildName(title);
// Get the properties for the node
Map<QName, Serializable> props = new HashMap<QName, Serializable>();
props.put(ContentModel.PROP_NAME, name);
props.put(ContentModel.PROP_TITLE, title);
// Build the node
NodeRef nodeRef = nodeService.createNode(
container,
ContentModel.ASSOC_CONTAINS,
QName.createQName(name),
ContentModel.TYPE_CONTENT,
props
).getChildRef();
// Store the content
ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
writer.setMimetype(MimetypeMap.MIMETYPE_HTML);
writer.setEncoding("UTF-8");
writer.putContent(content);
// Generate the wrapping object for it
// Build it that way, so creator and created date come through
return buildPage(nodeRef, container, name, content);
}
@Override
public WikiPageInfo updateWikiPage(WikiPageInfo page)
{
// Sanity check what we were given
if (page.getNodeRef() == null)
{
throw new IllegalArgumentException("Can't update a page that was never persisted, call create instead");
}
NodeRef nodeRef = page.getNodeRef();
String nodeName = buildName(page.getTitle());
// Handle the rename case
boolean renamed = false;
if (! nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE).equals(page.getTitle()))
{
try
{
fileFolderService.rename(nodeRef, nodeName);
renamed = true;
}
catch (FileNotFoundException e)
{
throw new AlfrescoRuntimeException("Invalid node state - wiki page no longer found");
}
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, nodeName);
nodeService.setProperty(nodeRef, ContentModel.PROP_TITLE, page.getTitle());
}
// Change the content
ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
writer.setMimetype(MimetypeMap.MIMETYPE_HTML);
writer.setEncoding("UTF-8");
writer.putContent(page.getContents());
// Now do the tags
taggingService.setTags(nodeRef, page.getTags());
// If we re-named, re-create the object
if (renamed)
{
page = buildPage(nodeRef, page.getContainerNodeRef(), nodeName, page.getContents());
}
// All done
return page;
}
@Override
public void deleteWikiPage(WikiPageInfo page)
{
if (page.getNodeRef() == null)
{
throw new IllegalArgumentException("Can't delete a wiki page that was never persisted");
}
nodeService.deleteNode(page.getNodeRef());
}
@Override
public PagingResults<WikiPageInfo> listWikiPages(String siteShortName, PagingRequest paging)
{
return listWikiPages(siteShortName, null, paging);
}
@Override
public PagingResults<WikiPageInfo> listWikiPages(String siteShortName, String user,
PagingRequest paging)
{
return listWikiPages(siteShortName, user, null, null, null, null, paging);
}
@Override
public PagingResults<WikiPageInfo> listWikiPagesByCreated(String siteShortName,
Date from, Date to, PagingRequest paging)
{
return listWikiPages(siteShortName, null, from, to, null, null, paging);
}
@Override
public PagingResults<WikiPageInfo> listWikiPagesByModified(String siteShortName,
Date from, Date to, PagingRequest paging)
{
return listWikiPages(siteShortName, null, null, null, from, to, paging);
}
public PagingResults<WikiPageInfo> listWikiPages(String siteShortName, String username,
Date createdFrom, Date createdTo, Date modifiedFrom, Date modifiedTo, PagingRequest paging)
{
NodeRef container = getSiteWikiContainer(siteShortName, false);
if (container == null)
{
// No events
return new EmptyPagingResults<WikiPageInfo>();
}
// Grab the factory
GetChildrenAuditableCannedQueryFactory getChildrenCannedQueryFactory =
(GetChildrenAuditableCannedQueryFactory)cannedQueryRegistry.getNamedObject(CANNED_QUERY_GET_CHILDREN);
// Do the sorting, newest first by created date
CannedQuerySortDetails sorting = getChildrenCannedQueryFactory.createDateDescendingCQSortDetails();
// Run the canned query
GetChildrenAuditableCannedQuery cq = (GetChildrenAuditableCannedQuery)getChildrenCannedQueryFactory.getCannedQuery(
container, ContentModel.TYPE_CONTENT, username, createdFrom, createdTo, null,
modifiedFrom, modifiedTo, sorting, paging);
// Execute the canned query
CannedQueryResults<NodeBackedEntity> results = cq.execute();
// Convert to Link objects
return wrap(results, container);
}
/**
* Our class to wrap up paged results of NodeBackedEntities as
* WikiPageInfo instances
*/
private PagingResults<WikiPageInfo> wrap(final PagingResults<NodeBackedEntity> results, final NodeRef container)
{
// Pre-load the nodes before we create them
List<Long> ids = new ArrayList<Long>();
for (NodeBackedEntity node : results.getPage())
{
ids.add(node.getId());
}
nodeDAO.cacheNodesById(ids);
// Wrap
return new PagingResults<WikiPageInfo>()
{
@Override
public String getQueryExecutionId()
{
return results.getQueryExecutionId();
}
@Override
public List<WikiPageInfo> getPage()
{
List<WikiPageInfo> pages = new ArrayList<WikiPageInfo>();
for (NodeBackedEntity node : results.getPage())
{
NodeRef nodeRef = node.getNodeRef();
String name = node.getName();
pages.add(buildPage(nodeRef, container, name, null));
}
return pages;
}
@Override
public boolean hasMoreItems()
{
return results.hasMoreItems();
}
@Override
public Pair<Integer, Integer> getTotalResultCount()
{
return results.getTotalResultCount();
}
};
}
}

View File

@@ -0,0 +1,97 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.service.cmr.wiki;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.alfresco.repo.security.permissions.PermissionCheckValue;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* This class represents a Wiki Paeg in a site
*
* @author Nick Burch
* @since 4.0
*/
public interface WikiPageInfo extends Serializable, PermissionCheckValue
{
/**
* @return the NodeRef of the underlying wiki page
*/
NodeRef getNodeRef();
/**
* @return the NodeRef of the site container this belongs to
*/
NodeRef getContainerNodeRef();
/**
* @return the name of the wiki page
*/
String getSystemName();
/**
* @return the Title of the wiki page
*/
String getTitle();
/**
* Sets the Title of the wiki page
*/
void setTitle(String title);
/**
* @return the HTML Content of the wiki page
*/
String getContents();
/**
* Sets the (HTML) Content of the wiki page
*/
void setContents(String contentHTML);
/**
* @return the creator of the wiki page
*/
String getCreator();
/**
* @return the modifier of the wiki page
*/
String getModifier();
/**
* @return the creation date and time
*/
Date getCreatedAt();
/**
* @return the modification date and time
*/
Date getModifiedAt();
/**
* @return the Tags associated with the wiki page
*/
List<String> getTags();
}

View File

@@ -0,0 +1,93 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.service.cmr.wiki;
import java.util.Date;
import org.alfresco.query.PagingRequest;
import org.alfresco.query.PagingResults;
import org.alfresco.service.NotAuditable;
/**
* The Wiki service.
*
* @author Nick Burch
* @since 4.0
*/
public interface WikiService
{
/**
* Creates a new {@link WikiPageInfo} in the given site, with the
* specified contents
*
* @return The newly created {@link WikiPageInfo}
*/
@NotAuditable
WikiPageInfo createWikiPage(String siteShortName, String title, String contents);
/**
* Updates an existing {@link WikiPageInfo} in the repository.
*
* @return The updated {@link WikiPageInfo}
*/
@NotAuditable
WikiPageInfo updateWikiPage(WikiPageInfo wikiPage);
/**
* Deletes an existing {@link WikiPageInfo} from the repository
*/
@NotAuditable
void deleteWikiPage(WikiPageInfo wikiPage);
/**
* Retrieves an existing {@link WikiPageInfo} from the repository
*/
@NotAuditable
WikiPageInfo getWikiPage(String siteShortName, String pageName);
/**
* Retrieves all {@link WikiPageInfo} instances in the repository
* for the given site.
*/
@NotAuditable
PagingResults<WikiPageInfo> listWikiPages(String siteShortName, PagingRequest paging);
/**
* Retrieves all {@link WikiPageInfo} instances in the repository
* for the given site and the specified user.
*/
@NotAuditable
PagingResults<WikiPageInfo> listWikiPages(String siteShortName, String user, PagingRequest paging);
/**
* Retrieves all {@link WikiPageInfo} instances in the repository
* for the given site, created in the specified date range
*/
@NotAuditable
PagingResults<WikiPageInfo> listWikiPagesByCreated(String siteShortName, Date from, Date to, PagingRequest paging);
/**
* Retrieves all {@link WikiPageInfo} instances in the repository
* for the given site, modified in the specified date range
*/
@NotAuditable
PagingResults<WikiPageInfo> listWikiPagesByModified(String siteShortName, Date from, Date to, PagingRequest paging);
}

View File

@@ -0,0 +1,222 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.slingshot.web.scripts;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.repo.web.scripts.admin.NodeBrowserPost;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.LimitBy;
import org.alfresco.service.cmr.search.SearchParameters;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* Node browser web script to handle search results, node details and workspaces.
* Extends the NodeBrowserPost script to inherit useful helper classes.
*
* @author dcaruana
* @author wabson
*/
public class NodeBrowserScript extends NodeBrowserPost implements Serializable
{
private static final long serialVersionUID = 48743409337475896L;
private Long searchElapsedTime = null;
/**
* Action to submit search
*
* @return next action
*/
public List<Node> submitSearch(final String store, final String query, final String queryLanguage, final int maxResults) throws IOException
{
long start = System.currentTimeMillis();
final StoreRef storeRef = new StoreRef(store);
RetryingTransactionCallback<List<Node>> searchCallback = new RetryingTransactionCallback<List<Node>>()
{
public List<Node> execute() throws Throwable
{
List<Node> searchResults = null;
if (queryLanguage.equals("storeroot"))
{
NodeRef rootNodeRef = getNodeService().getRootNode(storeRef);
searchResults = new ArrayList<Node>(1);
searchResults.add(new Node(rootNodeRef));
return searchResults;
}
else if (queryLanguage.equals("noderef"))
{
// ensure node exists
NodeRef nodeRef = new NodeRef(query);
boolean exists = getNodeService().exists(nodeRef);
if (!exists)
{
throw new WebScriptException(500, "Node " + nodeRef + " does not exist.");
}
searchResults = new ArrayList<Node>(1);
searchResults.add(new Node(nodeRef));
return searchResults;
}
SearchParameters sp = new SearchParameters();
sp.addStore(storeRef);
sp.setLanguage(queryLanguage);
sp.setQuery(query);
if (maxResults > 0)
{
sp.setLimit(maxResults);
sp.setLimitBy(LimitBy.FINAL_SIZE);
}
// perform search
List<NodeRef> nodeRefs = getSearchService().query(sp).getNodeRefs();
searchResults = new ArrayList<Node>(nodeRefs.size());
for (NodeRef nodeRef : nodeRefs) {
searchResults.add(new Node(nodeRef));
}
return searchResults;
}
};
try
{
List<Node> results = getTransactionService().getRetryingTransactionHelper().doInTransaction(searchCallback, true);
this.searchElapsedTime = System.currentTimeMillis() - start;
return results;
}
catch (Throwable e)
{
throw new IOException(e.getMessage(), e);
}
}
/**
* @return the searchElapsedTime
*/
protected Long getSearchElapsedTime()
{
return this.searchElapsedTime;
}
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
{
if (req.getPathInfo().equals("/slingshot/node/search"))
{
List<Node> nodes;
Map<String, Object> tmplMap = new HashMap<String, Object>(1);
try
{
if (req.getParameter("store") == null || req.getParameter("store").length() == 0)
{
status.setCode(HttpServletResponse.SC_BAD_REQUEST);
status.setMessage("Store name not provided");
status.setRedirect(true);
return null;
}
if (req.getParameter("q") == null || req.getParameter("q").length() == 0)
{
status.setCode(HttpServletResponse.SC_BAD_REQUEST);
status.setMessage("Search query not provided");
status.setRedirect(true);
return null;
}
if (req.getParameter("lang") == null || req.getParameter("lang").length() == 0)
{
status.setCode(HttpServletResponse.SC_BAD_REQUEST);
status.setMessage("Search language not provided");
status.setRedirect(true);
return null;
}
int maxResult = 0;
try
{
maxResult = Integer.parseInt(req.getParameter("maxResults"));
}
catch (NumberFormatException ex)
{
}
nodes = submitSearch(req.getParameter("store"), req.getParameter("q"), req.getParameter("lang"), maxResult);
tmplMap.put("results", nodes);
tmplMap.put("searchElapsedTime", getSearchElapsedTime());
}
catch (IOException e)
{
status.setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
status.setMessage(e.getMessage());
status.setException(e);
status.setRedirect(true);
}
return tmplMap;
}
else if (req.getPathInfo().equals("/slingshot/node/stores"))
{
Map<String, Object> model = new HashMap<String, Object>();
model.put("stores", getStores());
return model;
}
else // Assume we are looking for a node
{
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
if (templateVars.get("protocol") == null || templateVars.get("protocol").length() == 0 ||
templateVars.get("store") == null || templateVars.get("store").length() == 0 ||
templateVars.get("id") == null || templateVars.get("id").length() == 0)
{
status.setCode(HttpServletResponse.SC_BAD_REQUEST);
status.setMessage("Node not provided");
status.setRedirect(true);
return null;
}
NodeRef nodeRef = new NodeRef(templateVars.get("protocol"), templateVars.get("store"), templateVars.get("id"));
Map<String, Object> permissionInfo = new HashMap<String, Object>(3);
permissionInfo.put("entries", getPermissions(nodeRef));
permissionInfo.put("owner", this.getOwnableService().getOwner(nodeRef));
permissionInfo.put("inherit", this.getInheritPermissions(nodeRef));
permissionInfo.put("storePermissions", getStorePermissionMasks(nodeRef));
Map<String, Object> model = new HashMap<String, Object>();
model.put("node", new Node(nodeRef));
model.put("properties", getProperties(nodeRef));
model.put("aspects", getAspects(nodeRef));
model.put("children", getChildren(nodeRef));
model.put("parents", getParents(nodeRef));
model.put("assocs", getAssocs(nodeRef));
model.put("sourceAssocs", getSourceAssocs(nodeRef));
model.put("permissions", permissionInfo);
return model;
}
}
}

View File

@@ -0,0 +1,135 @@
/*
* Copyright 2005 - 2020 Alfresco Software Limited.
*
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of the paid license agreement will prevail.
* Otherwise, the software is provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.slingshot.web.scripts;
import java.io.IOException;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.sync.repo.Client;
import org.alfresco.sync.repo.Client.ClientType;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.repo.web.scripts.content.ContentGet;
import org.alfresco.service.cmr.activities.ActivityPoster;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
/**
* Share specific ContentGet implementation.
* <p>
* Checks to see if:
* a) the request is an explicit download (attachment)
* b) the requested NodeRef within the context of a Share Site
* <p>
* If both tests are true then generates an Activity feed item to record the Download request.
* All other requests and any further processing is performed by the super class.
*
* @author Kevin Roast
*/
public class SlingshotContentGet extends ContentGet
{
protected SiteService siteService;
private ActivityPoster poster;
private RetryingTransactionHelper transactionHelper;
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setPoster(ActivityPoster poster)
{
this.poster = poster;
}
public void setTransactionHelper(RetryingTransactionHelper transactionHelper)
{
this.transactionHelper = transactionHelper;
}
@Override
public void execute(final WebScriptRequest req, final WebScriptResponse res) throws IOException
{
// are we downloading content as an attachment?
if (Boolean.valueOf(req.getParameter("a")))
{
// is this private ActivityPoster poster; node part of a Site context?
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
String storeType = templateVars.get("store_type");
String storeId = templateVars.get("store_id");
String nodeId = templateVars.get("id");
// create the NodeRef and ensure it is valid
if (storeType != null && storeId != null && nodeId != null)
{
// MNT-16380
String nodeIdTmp = nodeId;
if (nodeId.contains("/"))
{
nodeIdTmp = nodeId.substring(0, nodeId.indexOf('/'));
}
final NodeRef nodeRef = new NodeRef(storeType, storeId, nodeIdTmp);
SiteInfo site = null;
try
{
site = this.siteService.getSite(nodeRef);
}
catch (AccessDeniedException ade)
{
// We don't have access to the site, don't post any permissions
}
if (site != null)
{
// found a valid parent Site - gather the details to post an Activity
String filename = templateVars.get("filename");
if (filename == null || filename.length() == 0)
{
filename = (String)this.nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
if (nodeId.contains("/"))
{
filename = nodeId.substring(nodeId.lastIndexOf("/") + 1);
}
}
final String strFilename = filename;
final String siteName = site.getShortName();
transactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
{
@Override
public Void execute() throws Throwable
{
// post an activity - mirror the mechanism as if from the Share application
poster.postFileFolderActivity(ActivityPoster.DOWNLOADED, null, null,
siteName, null, nodeRef, strFilename, "documentlibrary", Client.asType(ClientType.webclient), null);
return null;
}
}, false, true);
}
}
}
super.execute(req, res);
}
}

View File

@@ -0,0 +1,2 @@
abeecher=GROUP_site_swsdp_SiteCollaborator
mjackson=GROUP_site_swsdp_SiteManager

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Alfresco Share Data List Model
dl_datalistmodel.type.dl_dataList.title=Data List folder type
dl_datalistmodel.type.dl_dataList.description=Holds Data List items of the type specified in the dl:dataListItemType property.
dl_datalistmodel.property.dl_dataListItemType.title=Data List Item Type
dl_datalistmodel.property.dl_dataListItemType.description=Determines which subtype of dl:dataListItem will be used when create new items within the Data List.
dl_datalistmodel.type.dl_dataListItem.title=Data List parent type
dl_datalistmodel.type.dl_dataListItem.description=Parent type from which sample Data List Item types are derived.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=To Do List
dl_datalistmodel.type.dl_todoList.description=A simple to do list with optional assignee.
dl_datalistmodel.property.dl_todoTitle.title=Title
dl_datalistmodel.property.dl_todoDueDate.title=Due Date
dl_datalistmodel.property.dl_todoPriority.title=Priority
dl_datalistmodel.property.dl_todoStatus.title=Status
dl_datalistmodel.property.dl_todoNotes.title=Notes
dl_datalistmodel.association.dl_assignee.title=Assignee
dl_datalistmodel.association.dl_attachments.title=Attachments
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Start Date
dl_datalistmodel.property.dl_ganttEndDate.title=End Date
dl_datalistmodel.property.dl_ganttPercentComplete.title=% Complete
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Task List (Advanced)
dl_datalistmodel.type.dl_task.description=Advanced tasks list including title, description, start and end dates, priority, status, comments, assignees and attachments.
dl_datalistmodel.property.dl_taskPriority.title=Priority
dl_datalistmodel.property.dl_taskStatus.title=Status
dl_datalistmodel.property.dl_taskComments.title=Comments
dl_datalistmodel.association.dl_taskAssignee.title=Assignee
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Task List (Simple)
dl_datalistmodel.type.dl_simpletask.description=Simple tasks list including title, description, due date, priority, status, comments.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Due Date
dl_datalistmodel.property.dl_simpletaskPriority.title=Priority
dl_datalistmodel.property.dl_simpletaskStatus.title=Status
dl_datalistmodel.property.dl_simpletaskComments.title=Comments
# Contact
dl_datalistmodel.type.dl_contact.title=Contact List
dl_datalistmodel.type.dl_contact.description=Contacts list including first name, last name, full name, email, job title, phone (office), phone (mobile).
dl_datalistmodel.property.dl_contactFirstName.title=First Name
dl_datalistmodel.property.dl_contactLastName.title=Last Name
dl_datalistmodel.property.dl_contactEmail.title=Email
dl_datalistmodel.property.dl_contactCompany.title=Company
dl_datalistmodel.property.dl_contactJobTitle.title=Job Title
dl_datalistmodel.property.dl_contactPhoneOffice.title=Phone (Office)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Phone (Mobile)
dl_datalistmodel.property.dl_contactNotes.title=Notes
# Issues
dl_datalistmodel.type.dl_issue.title=Issue List
dl_datalistmodel.type.dl_issue.description=Issues list including ID, status, priority, description, due data, comments, assign to, related issues.
dl_datalistmodel.property.dl_issueID.title=Issue ID
dl_datalistmodel.property.dl_issueStatus.title=Status
dl_datalistmodel.property.dl_issuePriority.title=Priority
dl_datalistmodel.property.dl_issueDescription.title=Description
dl_datalistmodel.property.dl_issueDueDate.title=Due Date
dl_datalistmodel.property.dl_issueComments.title=Comments
dl_datalistmodel.association.dl_issueAssignedTo.title=Assigned To
dl_datalistmodel.property.dl_issueRelatedIssues.title=Related Issues
# Event
dl_datalistmodel.type.dl_event.title=Event List
dl_datalistmodel.type.dl_event.description=Events list including title, description, location, start and end date/time.
dl_datalistmodel.property.dl_eventLocation.title=Location
dl_datalistmodel.property.dl_eventStartDate.title=Start Date
dl_datalistmodel.property.dl_eventEndDate.title=End Date
dl_datalistmodel.property.dl_eventRegistrations.title=Registrations
dl_datalistmodel.property.dl_eventNote.title=Notes
# Location
dl_datalistmodel.type.dl_location.title=Location List
dl_datalistmodel.type.dl_location.description=Locations/Addresses list
dl_datalistmodel.property.dl_locationAddress1.title=Address Line 1
dl_datalistmodel.property.dl_locationAddress2.title=Address Line 2
dl_datalistmodel.property.dl_locationAddress3.title=Address Line 3
dl_datalistmodel.property.dl_locationZip.title=Zip/Post Code
dl_datalistmodel.property.dl_locationState.title=State/County
dl_datalistmodel.property.dl_locationCountry.title=Country
dl_datalistmodel.property.dl_locationNote.title=Notes
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.description=Manage meeting agenda items including description, owner, allocated time.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Reference
dl_datalistmodel.property.dl_meetingAgendaTime.title=Time (mins)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Owner
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Event Agenda
dl_datalistmodel.type.dl_eventAgenda.description=Manage event agenda items including session names, presenters, start and end times.
dl_datalistmodel.property.dl_eventAgendaRef.title=Reference
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Start Time
dl_datalistmodel.property.dl_eventAgendaEndTime.title=End Time
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Session Name
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Presenter
dl_datalistmodel.property.dl_eventAgendaAudience.title=Audience
dl_datalistmodel.property.dl_eventAgendaNotes.title=Notes
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=Not Started
listconstraint.dl_task_status.In\ Progress=In Progress
listconstraint.dl_task_status.On\ Hold= On Hold
listconstraint.dl_task_status.Complete=Complete
listconstraint.dl_priority_value.High=High
listconstraint.dl_priority_value.Normal=Normal
listconstraint.dl_priority_value.Low=Low

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Alfresco Share Datenlisten-Modell
dl_datalistmodel.type.dl_dataList.title=Ordnertyp der Datenliste
dl_datalistmodel.type.dl_dataList.description=H\u00e4lt Datenlisten-Elemente des angegebenen Typs in der Eigenschaft dl: dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Elementtyp Datenliste
dl_datalistmodel.property.dl_dataListItemType.description=Legt fest, welcher Subtyp von dl: dataListItem verwendet wird, wenn neue Elemente in der Datenliste erstellt werden.
dl_datalistmodel.type.dl_dataListItem.title=\u00dcbergeordneter Typ der Datenliste
dl_datalistmodel.type.dl_dataListItem.description=\u00dcbergeordneter Typ, von dem Mustertypen von Elementen der Datenliste abgeleitet werden.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Liste zu erledigender Aufgaben
dl_datalistmodel.type.dl_todoList.description=Einfache Liste zu erledigender Aufgaben mit optionaler zugewiesener Person.
dl_datalistmodel.property.dl_todoTitle.title=Titel
dl_datalistmodel.property.dl_todoDueDate.title=F\u00e4lligkeitsdatum
dl_datalistmodel.property.dl_todoPriority.title=Priorit\u00e4t
dl_datalistmodel.property.dl_todoStatus.title=Status
dl_datalistmodel.property.dl_todoNotes.title=Notizen
dl_datalistmodel.association.dl_assignee.title=Zugewiesene Person
dl_datalistmodel.association.dl_attachments.title=Anh\u00e4nge
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Anfangsdatum
dl_datalistmodel.property.dl_ganttEndDate.title=Enddatum
dl_datalistmodel.property.dl_ganttPercentComplete.title=% Abgeschlossen
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Aufgabenliste (Erweitert)
dl_datalistmodel.type.dl_task.description=Erweiterte Aufgabenliste einschlie\u00dflich Titel, Beschreibung, Anfangs- und Enddatum, Priorit\u00e4t, Status, Bemerkungen, zugewiesenen Personen und Anlagen.
dl_datalistmodel.property.dl_taskPriority.title=Priorit\u00e4t
dl_datalistmodel.property.dl_taskStatus.title=Status
dl_datalistmodel.property.dl_taskComments.title=Kommentare
dl_datalistmodel.association.dl_taskAssignee.title=Zugewiesene Person
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Aufgabenliste (Einfach)
dl_datalistmodel.type.dl_simpletask.description=Einfache Aufgabenliste einschlie\u00dflich Titel, Beschreibung, F\u00e4lligkeitsdatum, Priorit\u00e4t, Status, Kommentaren.
dl_datalistmodel.property.dl_simpletaskDueDate.title=F\u00e4lligkeitsdatum
dl_datalistmodel.property.dl_simpletaskPriority.title=Priorit\u00e4t
dl_datalistmodel.property.dl_simpletaskStatus.title=Status
dl_datalistmodel.property.dl_simpletaskComments.title=Kommentare
# Contact
dl_datalistmodel.type.dl_contact.title=Liste der Kontakte
dl_datalistmodel.type.dl_contact.description=Liste der Kontakte einschlie\u00dflich Vornamen, Nachnamen, vollst\u00e4ndigem Namen, E-Mail, Jobtitel, Telefon (B\u00fcro), Telefon (Mobil).
dl_datalistmodel.property.dl_contactFirstName.title=Vorname
dl_datalistmodel.property.dl_contactLastName.title=Nachname
dl_datalistmodel.property.dl_contactEmail.title=E-Mail
dl_datalistmodel.property.dl_contactCompany.title=Unternehmen
dl_datalistmodel.property.dl_contactJobTitle.title=Jobtitel
dl_datalistmodel.property.dl_contactPhoneOffice.title=Telefon (B\u00fcro)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Telefon (Mobil)
dl_datalistmodel.property.dl_contactNotes.title=Notizen
# Issues
dl_datalistmodel.type.dl_issue.title=Themenliste
dl_datalistmodel.type.dl_issue.description=Themenliste, die ID, Status, Priorit\u00e4t, Beschreibung, F\u00e4lligkeitsdatum, zugewiesen zu und verwandte Themen enth\u00e4lt.
dl_datalistmodel.property.dl_issueID.title=Themen ID
dl_datalistmodel.property.dl_issueStatus.title=Status
dl_datalistmodel.property.dl_issuePriority.title=Priorit\u00e4t
dl_datalistmodel.property.dl_issueDescription.title=Beschreibung
dl_datalistmodel.property.dl_issueDueDate.title=F\u00e4lligkeitsdatum
dl_datalistmodel.property.dl_issueComments.title=Kommentare
dl_datalistmodel.association.dl_issueAssignedTo.title=Zugewiesen an
dl_datalistmodel.property.dl_issueRelatedIssues.title=\u00c4hnliche Elemente
# Event
dl_datalistmodel.type.dl_event.title=Ereignisliste
dl_datalistmodel.type.dl_event.description=Ereignisliste einschlie\u00dflich Titel, Beschreibung, Ort, Anfangs- und Enddatum/-zeit.
dl_datalistmodel.property.dl_eventLocation.title=Speicherort
dl_datalistmodel.property.dl_eventStartDate.title=Anfangsdatum
dl_datalistmodel.property.dl_eventEndDate.title=Enddatum
dl_datalistmodel.property.dl_eventRegistrations.title=Registrierungen
dl_datalistmodel.property.dl_eventNote.title=Notizen
# Location
dl_datalistmodel.type.dl_location.title=Standortliste
dl_datalistmodel.type.dl_location.description=Liste Liste von Standorten/Adressen
dl_datalistmodel.property.dl_locationAddress1.title=Adresse Zeile 1
dl_datalistmodel.property.dl_locationAddress2.title=Adresse Zeile 2
dl_datalistmodel.property.dl_locationAddress3.title=Adresse Zeile 3
dl_datalistmodel.property.dl_locationZip.title=Postleitzahl
dl_datalistmodel.property.dl_locationState.title=Bundesland
dl_datalistmodel.property.dl_locationCountry.title=Land
dl_datalistmodel.property.dl_locationNote.title=Notizen
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Sitzungskalender
dl_datalistmodel.type.dl_meetingAgenda.description=Verwaltung von Elementen des Sitzungskalenders einschlie\u00dflich Beschreibung, Eigent\u00fcmer, zugewiesene Zeit.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Referenz
dl_datalistmodel.property.dl_meetingAgendaTime.title=Zeit (Minuten)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Eigent\u00fcmer
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Ereigniskalender
dl_datalistmodel.type.dl_eventAgenda.description=Ereigniskalender einschlie\u00dflich Namen der Sitzungen, Pr\u00e4sentatoren, Anfangs- und Endzeit verwalten.
dl_datalistmodel.property.dl_eventAgendaRef.title=Referenz
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Anfangszeit
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Endzeit
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Name der Sitzung
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Pr\u00e4sentator
dl_datalistmodel.property.dl_eventAgendaAudience.title=Publikum
dl_datalistmodel.property.dl_eventAgendaNotes.title=Notizen
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=nicht gestartet
listconstraint.dl_task_status.In\ Progress=in Bearbeitung
listconstraint.dl_task_status.On\ Hold=in Wartestellung
listconstraint.dl_task_status.Complete=Abgeschlossen
listconstraint.dl_priority_value.High=Hoch
listconstraint.dl_priority_value.Normal=Normal
listconstraint.dl_priority_value.Low=Niedrig

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Modelo de lista de datos de Alfresco Share
dl_datalistmodel.type.dl_dataList.title=Tipo de carpeta de lista de datos
dl_datalistmodel.type.dl_dataList.description=Contiene elementos de lista de datos del tipo especificado en la propiedad dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Tipo de elemento de lista de datos
dl_datalistmodel.property.dl_dataListItemType.description=Determina qu\u00e9 subtipo de dl:DataListItem se utilizar\u00e1 al crear nuevos elementos en la lista de datos.
dl_datalistmodel.type.dl_dataListItem.title=Tipo de padre de lista de datos
dl_datalistmodel.type.dl_dataListItem.description=Tipo de padre del que se derivan los tipos de elementos de muestra de listas de datos.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Lista de tareas pendientes
dl_datalistmodel.type.dl_todoList.description=Una lista sencilla de tareas pendientes con usuario opcional a asignar la tarea.
dl_datalistmodel.property.dl_todoTitle.title=T\u00edtulo
dl_datalistmodel.property.dl_todoDueDate.title=Fecha de vencimiento
dl_datalistmodel.property.dl_todoPriority.title=Prioridad
dl_datalistmodel.property.dl_todoStatus.title=Estado
dl_datalistmodel.property.dl_todoNotes.title=Notas
dl_datalistmodel.association.dl_assignee.title=Usuario asignado
dl_datalistmodel.association.dl_attachments.title=Adjuntos
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Fecha de inicio
dl_datalistmodel.property.dl_ganttEndDate.title=Fecha de fin
dl_datalistmodel.property.dl_ganttPercentComplete.title=% Completado
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Lista de tareas (Avanzada)
dl_datalistmodel.type.dl_task.description=Lista de tareas avanzada, incluyendo t\u00edtulo, descripci\u00f3n, fechas de inicio y finalizaci\u00f3n, prioridad, estado, comentarios, usuarios a asignar la tarea y adjuntos.
dl_datalistmodel.property.dl_taskPriority.title=Prioridad
dl_datalistmodel.property.dl_taskStatus.title=Estado
dl_datalistmodel.property.dl_taskComments.title=Comentarios
dl_datalistmodel.association.dl_taskAssignee.title=Usuario asignado
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Lista de tareas (sencillas)
dl_datalistmodel.type.dl_simpletask.description=Lista de tareas sencilla, incluyendo t\u00edtulo, descripci\u00f3n, fecha de vencimiento, prioridad, estado, comentarios.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Fecha de vencimiento
dl_datalistmodel.property.dl_simpletaskPriority.title=Prioridad
dl_datalistmodel.property.dl_simpletaskStatus.title=Estado
dl_datalistmodel.property.dl_simpletaskComments.title=Comentarios
# Contact
dl_datalistmodel.type.dl_contact.title=Lista de contactos
dl_datalistmodel.type.dl_contact.description=Lista de contactos incluyendo nombre, apellido, nombre completo, email, t\u00edtulo del trabajo, tel\u00e9fono (oficina), tel\u00e9fono (m\u00f3vil).
dl_datalistmodel.property.dl_contactFirstName.title=Nombre
dl_datalistmodel.property.dl_contactLastName.title=Apellidos
dl_datalistmodel.property.dl_contactEmail.title=Correo electr\u00f3nico
dl_datalistmodel.property.dl_contactCompany.title=Empresa
dl_datalistmodel.property.dl_contactJobTitle.title=Cargo
dl_datalistmodel.property.dl_contactPhoneOffice.title=Tel\u00e9fono (Oficina)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Tel\u00e9fono (M\u00f3vil)
dl_datalistmodel.property.dl_contactNotes.title=Notas
# Issues
dl_datalistmodel.type.dl_issue.title=Lista de temas
dl_datalistmodel.type.dl_issue.description=Lista de temas incluyendo ID, estado, prioridad, descripci\u00f3n, fechas de vencimiento, comentarios, asignar a, temas relacionados.
dl_datalistmodel.property.dl_issueID.title=ID de tema
dl_datalistmodel.property.dl_issueStatus.title=Estado
dl_datalistmodel.property.dl_issuePriority.title=Prioridad
dl_datalistmodel.property.dl_issueDescription.title=Descripci\u00f3n
dl_datalistmodel.property.dl_issueDueDate.title=Fecha de vencimiento
dl_datalistmodel.property.dl_issueComments.title=Comentarios
dl_datalistmodel.association.dl_issueAssignedTo.title=Asignado a
dl_datalistmodel.property.dl_issueRelatedIssues.title=Temas relacionados
# Event
dl_datalistmodel.type.dl_event.title=Lista de eventos
dl_datalistmodel.type.dl_event.description=Lista de eventos, incluyendo t\u00edtulo, descripci\u00f3n, ubicaci\u00f3n, fecha/hora de inicio y fin.
dl_datalistmodel.property.dl_eventLocation.title=Ubicaci\u00f3n
dl_datalistmodel.property.dl_eventStartDate.title=Fecha de inicio
dl_datalistmodel.property.dl_eventEndDate.title=Fecha de fin
dl_datalistmodel.property.dl_eventRegistrations.title=Inscripciones
dl_datalistmodel.property.dl_eventNote.title=Notas
# Location
dl_datalistmodel.type.dl_location.title=Lista de ubicaciones
dl_datalistmodel.type.dl_location.description=Lista de ubicaciones/direcciones
dl_datalistmodel.property.dl_locationAddress1.title=Direcci\u00f3n l\u00ednea 1
dl_datalistmodel.property.dl_locationAddress2.title=Direcci\u00f3n l\u00ednea 2
dl_datalistmodel.property.dl_locationAddress3.title=Direcci\u00f3n l\u00ednea 3
dl_datalistmodel.property.dl_locationZip.title=Zip/C\u00f3digo postal
dl_datalistmodel.property.dl_locationState.title=Estado/Condado
dl_datalistmodel.property.dl_locationCountry.title=Pa\u00eds
dl_datalistmodel.property.dl_locationNote.title=Notas
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Agenda de reuni\u00f3n
dl_datalistmodel.type.dl_meetingAgenda.description=Administrar elementos de agenda de reuni\u00f3n, incluyendo descripci\u00f3n, propietario, el tiempo asignado.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Referencia
dl_datalistmodel.property.dl_meetingAgendaTime.title=Tiempo (min)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Propietario
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Agenda de eventos
dl_datalistmodel.type.dl_eventAgenda.description=Administrar agenda de eventos incluyendo nombres de sesi\u00f3n, participantes, horas de inicio y fin.
dl_datalistmodel.property.dl_eventAgendaRef.title=Referencia
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Hora de inicio
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Hora de fin
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Nombre de sesi\u00f3n
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Participante
dl_datalistmodel.property.dl_eventAgendaAudience.title=Audiencia
dl_datalistmodel.property.dl_eventAgendaNotes.title=Notas
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=No iniciada
listconstraint.dl_task_status.In\ Progress=En curso
listconstraint.dl_task_status.On\ Hold=En espera
listconstraint.dl_task_status.Complete=Completa
listconstraint.dl_priority_value.High=Alta
listconstraint.dl_priority_value.Normal=Normal
listconstraint.dl_priority_value.Low=Baja

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Mod\u00e8le de liste de donn\u00e9es Alfresco Share
dl_datalistmodel.type.dl_dataList.title=Type de dossier de liste de donn\u00e9es
dl_datalistmodel.type.dl_dataList.description=Stocke les \u00e9l\u00e9ments de liste de donn\u00e9es du type sp\u00e9cifi\u00e9 dans la propri\u00e9t\u00e9 dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Type d'\u00e9l\u00e9ment de liste de donn\u00e9es
dl_datalistmodel.property.dl_dataListItemType.description=D\u00e9termine quel sous-type de dl:dataListItem sera utilis\u00e9 quand un nouvel \u00e9l\u00e9ment de la liste de donn\u00e9es sera cr\u00e9\u00e9.
dl_datalistmodel.type.dl_dataListItem.title=Type parent de liste de donn\u00e9es
dl_datalistmodel.type.dl_dataListItem.description=Type parent \u00e0 partir duquel d\u00e9rivent les types d'\u00e9l\u00e9ment de liste de donn\u00e9es.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Liste de t\u00e2ches
dl_datalistmodel.type.dl_todoList.description=Une liste de t\u00e2ches avec personne assign\u00e9e facultative.
dl_datalistmodel.property.dl_todoTitle.title=Titre
dl_datalistmodel.property.dl_todoDueDate.title=Ech\u00e9ance
dl_datalistmodel.property.dl_todoPriority.title=Priorit\u00e9
dl_datalistmodel.property.dl_todoStatus.title=Statut
dl_datalistmodel.property.dl_todoNotes.title=Notes
dl_datalistmodel.association.dl_assignee.title=Personne assign\u00e9e
dl_datalistmodel.association.dl_attachments.title=El\u00e9ments attach\u00e9s
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Date de d\u00e9but
dl_datalistmodel.property.dl_ganttEndDate.title=Date de fin
dl_datalistmodel.property.dl_ganttPercentComplete.title=% achev\u00e9
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Liste de t\u00e2ches (avanc\u00e9es)
dl_datalistmodel.type.dl_task.description=Liste de t\u00e2ches avanc\u00e9es comprenant le titre, la description, les dates de d\u00e9but et de fin, la priorit\u00e9, le statut, les commentaires, les acteurs et les pi\u00e8ces jointes.
dl_datalistmodel.property.dl_taskPriority.title=Priorit\u00e9
dl_datalistmodel.property.dl_taskStatus.title=Statut
dl_datalistmodel.property.dl_taskComments.title=Commentaires
dl_datalistmodel.association.dl_taskAssignee.title=Personne assign\u00e9e
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Liste de t\u00e2ches (simples)
dl_datalistmodel.type.dl_simpletask.description=Liste de t\u00e2ches simples comprenant le titre, la description, la date d'\u00e9ch\u00e9ance, la priorit\u00e9, le statut et les commentaires.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Ech\u00e9ance
dl_datalistmodel.property.dl_simpletaskPriority.title=Priorit\u00e9
dl_datalistmodel.property.dl_simpletaskStatus.title=Statut
dl_datalistmodel.property.dl_simpletaskComments.title=Commentaires
# Contact
dl_datalistmodel.type.dl_contact.title=Liste de contacts
dl_datalistmodel.type.dl_contact.description=Liste de contacts comprenant le pr\u00e9nom, le nom, le nom complet, l'e-mail, l'intitul\u00e9 du poste, le num\u00e9ro de t\u00e9l\u00e9phone (bureau) et le num\u00e9ro de t\u00e9l\u00e9phone (portable).
dl_datalistmodel.property.dl_contactFirstName.title=Pr\u00e9nom
dl_datalistmodel.property.dl_contactLastName.title=Nom
dl_datalistmodel.property.dl_contactEmail.title=E-mail
dl_datalistmodel.property.dl_contactCompany.title=Soci\u00e9t\u00e9
dl_datalistmodel.property.dl_contactJobTitle.title=Intitul\u00e9 du poste
dl_datalistmodel.property.dl_contactPhoneOffice.title=T\u00e9l\u00e9phone (bureau)
dl_datalistmodel.property.dl_contactPhoneMobile.title=T\u00e9l\u00e9phone (portable)
dl_datalistmodel.property.dl_contactNotes.title=Notes
# Issues
dl_datalistmodel.type.dl_issue.title=Liste de publications
dl_datalistmodel.type.dl_issue.description=Liste de publications comprenant l'identifiant, le statut, la priorit\u00e9, la description, la date d'\u00e9ch\u00e9ance, les commentaires, l'assignation et les publications apparent\u00e9es.
dl_datalistmodel.property.dl_issueID.title=Identifiant de publication
dl_datalistmodel.property.dl_issueStatus.title=Statut
dl_datalistmodel.property.dl_issuePriority.title=Priorit\u00e9
dl_datalistmodel.property.dl_issueDescription.title=Description
dl_datalistmodel.property.dl_issueDueDate.title=Ech\u00e9ance
dl_datalistmodel.property.dl_issueComments.title=Commentaires
dl_datalistmodel.association.dl_issueAssignedTo.title=Assign\u00e9 \u00e0
dl_datalistmodel.property.dl_issueRelatedIssues.title=Publications apparent\u00e9es
# Event
dl_datalistmodel.type.dl_event.title=Liste d'\u00e9v\u00e9nements
dl_datalistmodel.type.dl_event.description=Liste d'\u00e9v\u00e9nements comprenant le titre, la description, le lieu et les dates/heures de d\u00e9but et de fin.
dl_datalistmodel.property.dl_eventLocation.title=Emplacement
dl_datalistmodel.property.dl_eventStartDate.title=Date de d\u00e9but
dl_datalistmodel.property.dl_eventEndDate.title=Date de fin
dl_datalistmodel.property.dl_eventRegistrations.title=Inscriptions
dl_datalistmodel.property.dl_eventNote.title=Notes
# Location
dl_datalistmodel.type.dl_location.title=Carnet d'adresses
dl_datalistmodel.type.dl_location.description=Carnet d'adresses
dl_datalistmodel.property.dl_locationAddress1.title=Adresse (ligne 1)
dl_datalistmodel.property.dl_locationAddress2.title=Adresse (ligne 2)
dl_datalistmodel.property.dl_locationAddress3.title=Adresse (ligne 3)
dl_datalistmodel.property.dl_locationZip.title=Code postal
dl_datalistmodel.property.dl_locationState.title=D\u00e9partement
dl_datalistmodel.property.dl_locationCountry.title=Pays
dl_datalistmodel.property.dl_locationNote.title=Notes
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Ordre du jour
dl_datalistmodel.type.dl_meetingAgenda.description=G\u00e9rer un ordre du jour comprenant la description, le propri\u00e9taire et le temps imparti.
dl_datalistmodel.property.dl_meetingAgendaRef.title=R\u00e9f\u00e9rence
dl_datalistmodel.property.dl_meetingAgendaTime.title=Temps (min)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Propri\u00e9taire
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Agenda d'\u00e9v\u00e9nement
dl_datalistmodel.type.dl_eventAgenda.description=G\u00e9rer un agenda d'\u00e9v\u00e9nement comprenant les noms de s\u00e9ances, les intervenants et les heures de d\u00e9but et de fin de s\u00e9ance.
dl_datalistmodel.property.dl_eventAgendaRef.title=R\u00e9f\u00e9rence
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Heure de d\u00e9but
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Heure de fin
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Nom de la s\u00e9ance
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Intervenant
dl_datalistmodel.property.dl_eventAgendaAudience.title=Auditoire
dl_datalistmodel.property.dl_eventAgendaNotes.title=Notes
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=Pas d\u00e9marr\u00e9
listconstraint.dl_task_status.In\ Progress=En cours
listconstraint.dl_task_status.On\ Hold=Suspendu
listconstraint.dl_task_status.Complete=Achev\u00e9
listconstraint.dl_priority_value.High=\u00c9lev\u00e9e
listconstraint.dl_priority_value.Normal=Normale
listconstraint.dl_priority_value.Low=Basse

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Modello di elenco dati Alfresco Share
dl_datalistmodel.type.dl_dataList.title=Tipo di cartella dell'elenco dati
dl_datalistmodel.type.dl_dataList.description=Contiene elementi dell'elenco dati del tipo specificato nella propriet\u00e0 dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Tipo di elemento dell'elenco dati
dl_datalistmodel.property.dl_dataListItemType.description=Determina il sottotipo di dl:dataListItem che verr\u00e0 utilizzato durante la creazione di nuovi elementi nell'elenco dati.
dl_datalistmodel.type.dl_dataListItem.title=Tipo di genitore dell'elenco dati
dl_datalistmodel.type.dl_dataListItem.description=Tipo di genitore da cui derivano i tipi di elementi dell'elenco dati di esempio.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Elenco Da fare
dl_datalistmodel.type.dl_todoList.description=Semplice elenco di compiti da eseguire con assegnatario opzionale.
dl_datalistmodel.property.dl_todoTitle.title=Titolo
dl_datalistmodel.property.dl_todoDueDate.title=Data di scadenza
dl_datalistmodel.property.dl_todoPriority.title=Priorit\u00e0
dl_datalistmodel.property.dl_todoStatus.title=Stato
dl_datalistmodel.property.dl_todoNotes.title=Note
dl_datalistmodel.association.dl_assignee.title=Assegnatario
dl_datalistmodel.association.dl_attachments.title=Allegati
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Data di inizio
dl_datalistmodel.property.dl_ganttEndDate.title=Data di fine
dl_datalistmodel.property.dl_ganttPercentComplete.title=Percentuale di completamento
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Elenco di compiti (avanzato)
dl_datalistmodel.type.dl_task.description=Elenco di compiti avanzato contenente il titolo, la descrizione, le date di inizio e di fine, la priorit\u00e0, lo stato, i commenti, gli assegnatari e gli allegati.
dl_datalistmodel.property.dl_taskPriority.title=Priorit\u00e0
dl_datalistmodel.property.dl_taskStatus.title=Stato
dl_datalistmodel.property.dl_taskComments.title=Commenti
dl_datalistmodel.association.dl_taskAssignee.title=Assegnatario
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Elenco di compiti (semplice)
dl_datalistmodel.type.dl_simpletask.description=Elenco di compiti semplice contenente il titolo, la descrizione, la data di scadenza, la priorit\u00e0, lo stato e i commenti.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Data di scadenza
dl_datalistmodel.property.dl_simpletaskPriority.title=Priorit\u00e0
dl_datalistmodel.property.dl_simpletaskStatus.title=Stato
dl_datalistmodel.property.dl_simpletaskComments.title=Commenti
# Contact
dl_datalistmodel.type.dl_contact.title=Elenco di contatti
dl_datalistmodel.type.dl_contact.description=Elenco di contatti contenente il nome, il cognome, il nome completo, l'indirizzo e-mail, la qualifica, il telefono dell'ufficio e il cellulare.
dl_datalistmodel.property.dl_contactFirstName.title=Nome
dl_datalistmodel.property.dl_contactLastName.title=Cognome
dl_datalistmodel.property.dl_contactEmail.title=E-mail
dl_datalistmodel.property.dl_contactCompany.title=Azienda
dl_datalistmodel.property.dl_contactJobTitle.title=Qualifica
dl_datalistmodel.property.dl_contactPhoneOffice.title=Telefono (ufficio)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Cellulare
dl_datalistmodel.property.dl_contactNotes.title=Note
# Issues
dl_datalistmodel.type.dl_issue.title=Elenco di problemi
dl_datalistmodel.type.dl_issue.description=Elenco di problemi contenente l'ID, lo stato, la priorit\u00e0, la descrizione, la data di scadenza, i commenti, l'assegnatario e i problemi correlati.
dl_datalistmodel.property.dl_issueID.title=ID problema
dl_datalistmodel.property.dl_issueStatus.title=Stato
dl_datalistmodel.property.dl_issuePriority.title=Priorit\u00e0
dl_datalistmodel.property.dl_issueDescription.title=Descrizione
dl_datalistmodel.property.dl_issueDueDate.title=Data di scadenza
dl_datalistmodel.property.dl_issueComments.title=Commenti
dl_datalistmodel.association.dl_issueAssignedTo.title=Assegnato a
dl_datalistmodel.property.dl_issueRelatedIssues.title=Problemi correlati
# Event
dl_datalistmodel.type.dl_event.title=Elenco di eventi
dl_datalistmodel.type.dl_event.description=Elenco di eventi contenente il titolo, la descrizione, la localit\u00e0 e la data/ora di inizio e di fine.
dl_datalistmodel.property.dl_eventLocation.title=Localit\u00e0
dl_datalistmodel.property.dl_eventStartDate.title=Data di inizio
dl_datalistmodel.property.dl_eventEndDate.title=Data di fine
dl_datalistmodel.property.dl_eventRegistrations.title=Registrazioni
dl_datalistmodel.property.dl_eventNote.title=Note
# Location
dl_datalistmodel.type.dl_location.title=Elenco di localit\u00e0
dl_datalistmodel.type.dl_location.description=Elenco di localit\u00e0/indirizzi
dl_datalistmodel.property.dl_locationAddress1.title=Riga 1 indirizzo
dl_datalistmodel.property.dl_locationAddress2.title=Riga 2 indirizzo
dl_datalistmodel.property.dl_locationAddress3.title=Riga 3 indirizzo
dl_datalistmodel.property.dl_locationZip.title=CAP/Codice postale
dl_datalistmodel.property.dl_locationState.title=Stato
dl_datalistmodel.property.dl_locationCountry.title=Paese
dl_datalistmodel.property.dl_locationNote.title=Note
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Agenda riunioni
dl_datalistmodel.type.dl_meetingAgenda.description=Consente di gestire le voci dell'agenda delle riunioni, tra cui la descrizione, il proprietario e l'ora di assegnazione.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Riferimento
dl_datalistmodel.property.dl_meetingAgendaTime.title=Ora (minuti)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Proprietario
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Agenda eventi
dl_datalistmodel.type.dl_eventAgenda.description=Consente di gestire le voci dell'agenda degli eventi, tra cui i nomi delle sessioni, i relatori e le ore di inizio e di fine.
dl_datalistmodel.property.dl_eventAgendaRef.title=Riferimento
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Ora di inizio
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Ora di fine
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Nome sessione
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Relatore
dl_datalistmodel.property.dl_eventAgendaAudience.title=Destinatari
dl_datalistmodel.property.dl_eventAgendaNotes.title=Note
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=Non avviato
listconstraint.dl_task_status.In\ Progress=In corso
listconstraint.dl_task_status.On\ Hold=In attesa
listconstraint.dl_task_status.Complete=Completato
listconstraint.dl_priority_value.High=Alta
listconstraint.dl_priority_value.Normal=Normale
listconstraint.dl_priority_value.Low=Bassa

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Alfresco Share \u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u30e2\u30c7\u30eb
dl_datalistmodel.type.dl_dataList.title=\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u30d5\u30a9\u30eb\u30c0\u306e\u30bf\u30a4\u30d7
dl_datalistmodel.type.dl_dataList.description=dl:dataListItemType \u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u6307\u5b9a\u3055\u308c\u305f\u30bf\u30a4\u30d7\u306e\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u30a2\u30a4\u30c6\u30e0\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002
dl_datalistmodel.property.dl_dataListItemType.title=\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u30a2\u30a4\u30c6\u30e0\u306e\u30bf\u30a4\u30d7
dl_datalistmodel.property.dl_dataListItemType.description=\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u5185\u3067\u65b0\u3057\u3044\u30a2\u30a4\u30c6\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528\u3059\u308b dl:dataListItem \u306e\u30b5\u30d6\u30bf\u30a4\u30d7\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002
dl_datalistmodel.type.dl_dataListItem.title=\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u306e\u89aa\u30bf\u30a4\u30d7
dl_datalistmodel.type.dl_dataListItem.description=\u89aa\u30bf\u30a4\u30d7\u3068\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u306e\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u30a2\u30a4\u30c6\u30e0\u306e\u30bf\u30a4\u30d7\u304c\u5f93\u5c5e\u3059\u308b\u30bf\u30a4\u30d7\u3092\u6307\u3057\u307e\u3059\u3002
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=\u7528\u4ef6\u30ea\u30b9\u30c8
dl_datalistmodel.type.dl_todoList.description=\u30b7\u30f3\u30d7\u30eb\u306a\u7528\u4ef6\u30ea\u30b9\u30c8\u3002\u62c5\u5f53\u8005\u3092\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002
dl_datalistmodel.property.dl_todoTitle.title=\u30bf\u30a4\u30c8\u30eb
dl_datalistmodel.property.dl_todoDueDate.title=\u671f\u9650
dl_datalistmodel.property.dl_todoPriority.title=\u512a\u5148\u5ea6
dl_datalistmodel.property.dl_todoStatus.title=\u30b9\u30c6\u30fc\u30bf\u30b9
dl_datalistmodel.property.dl_todoNotes.title=\u30e1\u30e2
dl_datalistmodel.association.dl_assignee.title=\u62c5\u5f53\u8005
dl_datalistmodel.association.dl_attachments.title=\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=\u958b\u59cb\u65e5
dl_datalistmodel.property.dl_ganttEndDate.title=\u7d42\u4e86\u65e5
dl_datalistmodel.property.dl_ganttPercentComplete.title=% \u5b8c\u4e86
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=\u30bf\u30b9\u30af\u30ea\u30b9\u30c8 (\u8a73\u7d30)
dl_datalistmodel.type.dl_task.description=\u30bf\u30b9\u30af\u306e\u30bf\u30a4\u30c8\u30eb\u3001\u8aac\u660e\u3001\u958b\u59cb\u65e5\u3001\u7d42\u4e86\u65e5\u3001\u512a\u5148\u5ea6\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u3001\u30b3\u30e1\u30f3\u30c8\u3001\u62c5\u5f53\u8005\u3001\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_taskPriority.title=\u512a\u5148\u5ea6
dl_datalistmodel.property.dl_taskStatus.title=\u30b9\u30c6\u30fc\u30bf\u30b9
dl_datalistmodel.property.dl_taskComments.title=\u30b3\u30e1\u30f3\u30c8
dl_datalistmodel.association.dl_taskAssignee.title=\u62c5\u5f53\u8005
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=\u30bf\u30b9\u30af\u30ea\u30b9\u30c8 (\u30b7\u30f3\u30d7\u30eb)
dl_datalistmodel.type.dl_simpletask.description=\u30bf\u30b9\u30af\u306e\u30bf\u30a4\u30c8\u30eb\u3001\u8aac\u660e\u3001\u671f\u9650\u3001\u512a\u5148\u5ea6\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u3001\u30b3\u30e1\u30f3\u30c8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_simpletaskDueDate.title=\u671f\u9650
dl_datalistmodel.property.dl_simpletaskPriority.title=\u512a\u5148\u5ea6
dl_datalistmodel.property.dl_simpletaskStatus.title=\u30b9\u30c6\u30fc\u30bf\u30b9
dl_datalistmodel.property.dl_simpletaskComments.title=\u30b3\u30e1\u30f3\u30c8
# Contact
dl_datalistmodel.type.dl_contact.title=\u9023\u7d61\u5148\u30ea\u30b9\u30c8
dl_datalistmodel.type.dl_contact.description=\u540d\u524d\u3001E \u30e1\u30fc\u30eb\u3001\u5f79\u8077\u3001\u96fb\u8a71 (\u4f1a\u793e)\u3001\u96fb\u8a71 (\u643a\u5e2f) \u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_contactFirstName.title=\u540d
dl_datalistmodel.property.dl_contactLastName.title=\u59d3
dl_datalistmodel.property.dl_contactEmail.title=E \u30e1\u30fc\u30eb
dl_datalistmodel.property.dl_contactCompany.title=\u4f1a\u793e\u540d
dl_datalistmodel.property.dl_contactJobTitle.title=\u5f79\u8077\u540d
dl_datalistmodel.property.dl_contactPhoneOffice.title=\u96fb\u8a71\uff08\u4f1a\u793e\uff09
dl_datalistmodel.property.dl_contactPhoneMobile.title=\u96fb\u8a71\uff08\u643a\u5e2f\uff09
dl_datalistmodel.property.dl_contactNotes.title=\u30e1\u30e2
# Issues
dl_datalistmodel.type.dl_issue.title=\u8ab2\u984c\u30ea\u30b9\u30c8
dl_datalistmodel.type.dl_issue.description=ID\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u3001\u512a\u5148\u5ea6\u3001\u8aac\u660e\u3001\u671f\u9650\u3001\u30b3\u30e1\u30f3\u30c8\u3001\u62c5\u5f53\u8005\u3001\u95a2\u9023\u8ab2\u984c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_issueID.title=\u8ab2\u984c ID
dl_datalistmodel.property.dl_issueStatus.title=\u30b9\u30c6\u30fc\u30bf\u30b9
dl_datalistmodel.property.dl_issuePriority.title=\u512a\u5148\u5ea6
dl_datalistmodel.property.dl_issueDescription.title=\u8aac\u660e
dl_datalistmodel.property.dl_issueDueDate.title=\u671f\u9650
dl_datalistmodel.property.dl_issueComments.title=\u30b3\u30e1\u30f3\u30c8
dl_datalistmodel.association.dl_issueAssignedTo.title=\u62c5\u5f53\u8005
dl_datalistmodel.property.dl_issueRelatedIssues.title=\u95a2\u9023\u8ab2\u984c
# Event
dl_datalistmodel.type.dl_event.title=\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30c8
dl_datalistmodel.type.dl_event.description=\u30a4\u30d9\u30f3\u30c8\u306e\u30bf\u30a4\u30c8\u30eb\u3001\u8aac\u660e\u3001\u5834\u6240\u3001\u512a\u5148\u5ea6\u3001\u958b\u59cb\u65e5\u6642\u3001\u7d42\u4e86\u65e5\u6642\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_eventLocation.title=\u5834\u6240
dl_datalistmodel.property.dl_eventStartDate.title=\u958b\u59cb\u65e5
dl_datalistmodel.property.dl_eventEndDate.title=\u7d42\u4e86\u65e5
dl_datalistmodel.property.dl_eventRegistrations.title=\u767b\u9332\u6570
dl_datalistmodel.property.dl_eventNote.title=\u30e1\u30e2
# Location
dl_datalistmodel.type.dl_location.title=\u4f4f\u6240\u30ea\u30b9\u30c8
dl_datalistmodel.type.dl_location.description=\u4f4f\u6240\u304c\u8868\u793a\u3055\u308c\u307e\u3059
dl_datalistmodel.property.dl_locationAddress1.title=\u4f4f\u62401
dl_datalistmodel.property.dl_locationAddress2.title=\u4f4f\u6240 2
dl_datalistmodel.property.dl_locationAddress3.title=\u4f4f\u6240 3
dl_datalistmodel.property.dl_locationZip.title=\u90f5\u4fbf\u756a\u53f7
dl_datalistmodel.property.dl_locationState.title=\u90fd\u9053\u5e9c\u770c
dl_datalistmodel.property.dl_locationCountry.title=\u56fd
dl_datalistmodel.property.dl_locationNote.title=\u30e1\u30e2
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=\u4f1a\u8b70\u30a2\u30b8\u30a7\u30f3\u30c0
dl_datalistmodel.type.dl_meetingAgenda.description=\u4f1a\u8b70\u306e\u30a2\u30b8\u30a7\u30f3\u30c0 (\u8aac\u660e\u3001\u4e3b\u50ac\u8005\u3001\u4e88\u5b9a\u6642\u9593) \u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_meetingAgendaRef.title=\u53c2\u7167
dl_datalistmodel.property.dl_meetingAgendaTime.title=\u6642\u9593 (\u5206)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=\u6240\u6709\u8005
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=\u30a4\u30d9\u30f3\u30c8\u30a2\u30b8\u30a7\u30f3\u30c0
dl_datalistmodel.type.dl_eventAgenda.description=\u30a4\u30d9\u30f3\u30c8\u306e\u30a2\u30b8\u30a7\u30f3\u30c0 (\u30bb\u30c3\u30b7\u30e7\u30f3\u540d\u3001\u767a\u8868\u8005\u3001\u958b\u59cb\u6642\u523b\u3001\u7d42\u4e86\u6642\u523b) \u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
dl_datalistmodel.property.dl_eventAgendaRef.title=\u53c2\u7167
dl_datalistmodel.property.dl_eventAgendaStartTime.title=\u958b\u59cb\u6642\u523b
dl_datalistmodel.property.dl_eventAgendaEndTime.title=\u7d42\u4e86\u6642\u523b
dl_datalistmodel.property.dl_eventAgendaSessionName.title=\u30bb\u30c3\u30b7\u30e7\u30f3\u540d
dl_datalistmodel.property.dl_eventAgendaPresenter.title=\u767a\u8868\u8005
dl_datalistmodel.property.dl_eventAgendaAudience.title=\u53c2\u52a0\u8005
dl_datalistmodel.property.dl_eventAgendaNotes.title=\u30e1\u30e2
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=\u958b\u59cb\u524d
listconstraint.dl_task_status.In\ Progress=\u9032\u884c\u4e2d
listconstraint.dl_task_status.On\ Hold=\u4fdd\u7559\u4e2d
listconstraint.dl_task_status.Complete=\u5b8c\u4e86
listconstraint.dl_priority_value.High=\u9ad8
listconstraint.dl_priority_value.Normal=\u4e2d
listconstraint.dl_priority_value.Low=\u4f4e

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Datalistemodell for Alfresco Deling
dl_datalistmodel.type.dl_dataList.title=Mappetype for dataliste
dl_datalistmodel.type.dl_dataList.description=Holder datalisteelementer av den typen som angis i egenskapen dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Type datalisteelement
dl_datalistmodel.property.dl_dataListItemType.description=Fastsetter hvilken undertype av dl:dataListItem som brukes n\u00e5r nye elementer opprettes innenfor datalisten.
dl_datalistmodel.type.dl_dataListItem.title=Overordnet type for dataliste
dl_datalistmodel.type.dl_dataListItem.description=Fra hvilken overordnet type som utvalg av datalisteelementtyper hentes fra.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Liste over gj\u00f8rem\u00e5l
dl_datalistmodel.type.dl_todoList.description=En enkel liste over gj\u00f8rem\u00e5l med valgfri tilordnet person.
dl_datalistmodel.property.dl_todoTitle.title=Tittel
dl_datalistmodel.property.dl_todoDueDate.title=Forfallsdato
dl_datalistmodel.property.dl_todoPriority.title=Prioritet
dl_datalistmodel.property.dl_todoStatus.title=Status
dl_datalistmodel.property.dl_todoNotes.title=Merknader
dl_datalistmodel.association.dl_assignee.title=Tilordnet
dl_datalistmodel.association.dl_attachments.title=Vedlegg
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Startdato
dl_datalistmodel.property.dl_ganttEndDate.title=Sluttdato
dl_datalistmodel.property.dl_ganttPercentComplete.title=% fullf\u00f8rt
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Oppgaveliste (avansert)
dl_datalistmodel.type.dl_task.description=Avansert oppgaveliste som inkluderer tittel, beskrivelse, start- og sluttdatoer, prioritet, status, kommentarer, tilordnede og vedlegg.
dl_datalistmodel.property.dl_taskPriority.title=Prioritet
dl_datalistmodel.property.dl_taskStatus.title=Status
dl_datalistmodel.property.dl_taskComments.title=Kommentarer
dl_datalistmodel.association.dl_taskAssignee.title=Tilordnet
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Oppgaveliste (enkel)
dl_datalistmodel.type.dl_simpletask.description=Enkel oppgaveliste som inkluderer tittel, beskrivelse, forfallsdato, prioritet, status og kommentarer.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Forfallsdato
dl_datalistmodel.property.dl_simpletaskPriority.title=Prioritet
dl_datalistmodel.property.dl_simpletaskStatus.title=Status
dl_datalistmodel.property.dl_simpletaskComments.title=Kommentarer
# Contact
dl_datalistmodel.type.dl_contact.title=Kontaktliste
dl_datalistmodel.type.dl_contact.description=Kontaktliste som inkluderer fornavn, etternavn, fullt navn, jobbtittel, telefon (kontor), telefon (mobil).
dl_datalistmodel.property.dl_contactFirstName.title=Fornavn
dl_datalistmodel.property.dl_contactLastName.title=Etternavn
dl_datalistmodel.property.dl_contactEmail.title=E-post
dl_datalistmodel.property.dl_contactCompany.title=Firma
dl_datalistmodel.property.dl_contactJobTitle.title=Stillingstittel
dl_datalistmodel.property.dl_contactPhoneOffice.title=Telefon (kontor)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Telefon (mobil)
dl_datalistmodel.property.dl_contactNotes.title=Merknader
# Issues
dl_datalistmodel.type.dl_issue.title=Problemliste
dl_datalistmodel.type.dl_issue.description=Problemliste som inkluderer ID, status, prioritet, beskrivelse, forfallsdato, kommentarer, tilordnet til, relaterte problemer.
dl_datalistmodel.property.dl_issueID.title=Problem-ID
dl_datalistmodel.property.dl_issueStatus.title=Status
dl_datalistmodel.property.dl_issuePriority.title=Prioritet
dl_datalistmodel.property.dl_issueDescription.title=Beskrivelse
dl_datalistmodel.property.dl_issueDueDate.title=Forfallsdato
dl_datalistmodel.property.dl_issueComments.title=Kommentarer
dl_datalistmodel.association.dl_issueAssignedTo.title=Tilordnet til
dl_datalistmodel.property.dl_issueRelatedIssues.title=Relaterte problemer
# Event
dl_datalistmodel.type.dl_event.title=Hendelsesliste
dl_datalistmodel.type.dl_event.description=Hendelsesliste som inkluderer tittel, beskrivelse, sted, start- og sluttdato/-tid.
dl_datalistmodel.property.dl_eventLocation.title=Sted
dl_datalistmodel.property.dl_eventStartDate.title=Startdato
dl_datalistmodel.property.dl_eventEndDate.title=Sluttdato
dl_datalistmodel.property.dl_eventRegistrations.title=Registreringer
dl_datalistmodel.property.dl_eventNote.title=Merknader
# Location
dl_datalistmodel.type.dl_location.title=Stedsliste
dl_datalistmodel.type.dl_location.description=Liste over steder/adresser
dl_datalistmodel.property.dl_locationAddress1.title=Adresserad 1
dl_datalistmodel.property.dl_locationAddress2.title=Adresserad 2
dl_datalistmodel.property.dl_locationAddress3.title=Adresserad 3
dl_datalistmodel.property.dl_locationZip.title=Postnummer
dl_datalistmodel.property.dl_locationState.title=Fylke/kommune
dl_datalistmodel.property.dl_locationCountry.title=Land
dl_datalistmodel.property.dl_locationNote.title=Merknader
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Saksliste
dl_datalistmodel.type.dl_meetingAgenda.description=Administrer sakslisteelementer som inkluderer beskrivelse, eier, tildelt tid.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Referanse
dl_datalistmodel.property.dl_meetingAgendaTime.title=Tid (minutter)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Eier
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Hendelsesagenda
dl_datalistmodel.type.dl_eventAgenda.description=Administrer hendelsesagendaelementer som inkluderer \u00f8ktnavn, person som presenterer, start- og sluttider.
dl_datalistmodel.property.dl_eventAgendaRef.title=Referanse
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Starttid
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Sluttid
dl_datalistmodel.property.dl_eventAgendaSessionName.title=\u00d8ktnavn
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Person som presenterer
dl_datalistmodel.property.dl_eventAgendaAudience.title=Publikum
dl_datalistmodel.property.dl_eventAgendaNotes.title=Merknader
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=Ikke startet
listconstraint.dl_task_status.In\ Progress=P\u00e5g\u00e5r
listconstraint.dl_task_status.On\ Hold=P\u00e5 vent
listconstraint.dl_task_status.Complete=Fullf\u00f8r
listconstraint.dl_priority_value.High=H\u00f8y
listconstraint.dl_priority_value.Normal=Normal
listconstraint.dl_priority_value.Low=Lav

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Alfresco Share-gegevenslijstmodel
dl_datalistmodel.type.dl_dataList.title=Maptype van gegevenslijst
dl_datalistmodel.type.dl_dataList.description=Bevat gegevenslijstobjecten van het type dat is opgegeven in de eigenschap dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Objecttype van gegevenslijst
dl_datalistmodel.property.dl_dataListItemType.description=Bepaalt welk subtype van dl:dataListItem wordt gebruikt bij het maken van nieuwe objecten in de gegevenslijst.
dl_datalistmodel.type.dl_dataListItem.title=Bovenliggend type van gegevenslijst
dl_datalistmodel.type.dl_dataListItem.description=Bovenliggend type waarvan voorbeeldobjecttypen van de gegevenslijst zijn afgeleid.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Takenlijst
dl_datalistmodel.type.dl_todoList.description=Een eenvoudige takenlijst met een optionele toegewezen persoon.
dl_datalistmodel.property.dl_todoTitle.title=Titel
dl_datalistmodel.property.dl_todoDueDate.title=Vervaldatum
dl_datalistmodel.property.dl_todoPriority.title=Prioriteit
dl_datalistmodel.property.dl_todoStatus.title=Status
dl_datalistmodel.property.dl_todoNotes.title=Opmerkingen
dl_datalistmodel.association.dl_assignee.title=Toegewezen persoon
dl_datalistmodel.association.dl_attachments.title=Bijlagen
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Begindatum
dl_datalistmodel.property.dl_ganttEndDate.title=Einddatum
dl_datalistmodel.property.dl_ganttPercentComplete.title=% voltooid
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Takenlijst (geavanceerd)
dl_datalistmodel.type.dl_task.description=Geavanceerde takenlijst, inclusief titel, beschrijving, begin- en einddatum, prioriteit, status, opmerkingen, toegewezen personen en bijlagen.
dl_datalistmodel.property.dl_taskPriority.title=Prioriteit
dl_datalistmodel.property.dl_taskStatus.title=Status
dl_datalistmodel.property.dl_taskComments.title=Opmerkingen
dl_datalistmodel.association.dl_taskAssignee.title=Toegewezen persoon
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Takenlijst (eenvoudig)
dl_datalistmodel.type.dl_simpletask.description=Eenvoudige takenlijst, inclusief titel, beschrijving, vervaldatum, prioriteit, status en opmerkingen.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Vervaldatum
dl_datalistmodel.property.dl_simpletaskPriority.title=Prioriteit
dl_datalistmodel.property.dl_simpletaskStatus.title=Status
dl_datalistmodel.property.dl_simpletaskComments.title=Opmerkingen
# Contact
dl_datalistmodel.type.dl_contact.title=Lijst met contactpersonen
dl_datalistmodel.type.dl_contact.description=Lijst met contactpersonen, inclusief voornaam, achternaam, volledige naam, e-mailadres, functie, telefoon (kantoor), telefoon (mobiel).
dl_datalistmodel.property.dl_contactFirstName.title=Voornaam
dl_datalistmodel.property.dl_contactLastName.title=Achternaam
dl_datalistmodel.property.dl_contactEmail.title=E-mailadres
dl_datalistmodel.property.dl_contactCompany.title=Bedrijf
dl_datalistmodel.property.dl_contactJobTitle.title=Functie
dl_datalistmodel.property.dl_contactPhoneOffice.title=Telefoon (kantoor)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Telefoon (mobiel)
dl_datalistmodel.property.dl_contactNotes.title=Opmerkingen
# Issues
dl_datalistmodel.type.dl_issue.title=Lijst met problemen
dl_datalistmodel.type.dl_issue.description=Lijst met problemen, inclusief id, status, prioriteit, beschrijving, vervaldatums, opmerkingen, toewijzen aan, gerelateerde problemen.
dl_datalistmodel.property.dl_issueID.title=Probleem-id
dl_datalistmodel.property.dl_issueStatus.title=Status
dl_datalistmodel.property.dl_issuePriority.title=Prioriteit
dl_datalistmodel.property.dl_issueDescription.title=Beschrijving
dl_datalistmodel.property.dl_issueDueDate.title=Vervaldatum
dl_datalistmodel.property.dl_issueComments.title=Opmerkingen
dl_datalistmodel.association.dl_issueAssignedTo.title=Toegewezen aan
dl_datalistmodel.property.dl_issueRelatedIssues.title=Gerelateerde problemen
# Event
dl_datalistmodel.type.dl_event.title=Lijst met gebeurtenissen
dl_datalistmodel.type.dl_event.description=Lijst met gebeurtenissen, inclusief titel, beschrijving, locatie en begin- en einddatum/-tijd.
dl_datalistmodel.property.dl_eventLocation.title=Locatie
dl_datalistmodel.property.dl_eventStartDate.title=Begindatum
dl_datalistmodel.property.dl_eventEndDate.title=Einddatum
dl_datalistmodel.property.dl_eventRegistrations.title=Registraties
dl_datalistmodel.property.dl_eventNote.title=Opmerkingen
# Location
dl_datalistmodel.type.dl_location.title=Lijst met locaties
dl_datalistmodel.type.dl_location.description=Lijst met locaties/adressen
dl_datalistmodel.property.dl_locationAddress1.title=Adresregel 1
dl_datalistmodel.property.dl_locationAddress2.title=Adresregel 2
dl_datalistmodel.property.dl_locationAddress3.title=Adresregel 3
dl_datalistmodel.property.dl_locationZip.title=Postcode
dl_datalistmodel.property.dl_locationState.title=Staat/provincie
dl_datalistmodel.property.dl_locationCountry.title=Land
dl_datalistmodel.property.dl_locationNote.title=Opmerkingen
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Vergaderagenda
dl_datalistmodel.type.dl_meetingAgenda.description=Beheer vergaderagenda-items zoals beschrijving, eigenaar, toegewezen tijd.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Verwijzing
dl_datalistmodel.property.dl_meetingAgendaTime.title=Tijd (min.)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Eigenaar
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Gebeurtenisagenda
dl_datalistmodel.type.dl_eventAgenda.description=Beheer gebeurtenisagenda-items zoals sessienamen, presentators en begin- en eindtijden.
dl_datalistmodel.property.dl_eventAgendaRef.title=Verwijzing
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Begintijd
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Eindtijd
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Sessienaam
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Presentator
dl_datalistmodel.property.dl_eventAgendaAudience.title=Publiek
dl_datalistmodel.property.dl_eventAgendaNotes.title=Opmerkingen
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=Niet gestart
listconstraint.dl_task_status.In\ Progress=In uitvoering
listconstraint.dl_task_status.On\ Hold=In bewaring
listconstraint.dl_task_status.Complete=Voltooid
listconstraint.dl_priority_value.High=Hoog
listconstraint.dl_priority_value.Normal=Normaal
listconstraint.dl_priority_value.Low=Laag

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Modelo de lista de dados do Alfresco Share
dl_datalistmodel.type.dl_dataList.title=Tipo de pasta de lista de dados
dl_datalistmodel.type.dl_dataList.description=Cont\u00e9m itens de lista de dados do tipo especificado na propriedade dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=Tipo de item da lista de dados
dl_datalistmodel.property.dl_dataListItemType.description=Determina qual subtipo de dl:dataListItem ser\u00e1 usado quando criar novos itens na lista de dados.
dl_datalistmodel.type.dl_dataListItem.title=Tipo prim\u00e1rio da lista de dados
dl_datalistmodel.type.dl_dataListItem.description=Tipo prim\u00e1rio a partir do qual os tipos de item da lista de dados amostrais s\u00e3o derivados.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=Lista de tarefas
dl_datalistmodel.type.dl_todoList.description=Uma lista de tarefas simples com destinat\u00e1rio opcional.
dl_datalistmodel.property.dl_todoTitle.title=T\u00edtulo
dl_datalistmodel.property.dl_todoDueDate.title=Data de vencimento
dl_datalistmodel.property.dl_todoPriority.title=Prioridade
dl_datalistmodel.property.dl_todoStatus.title=Status
dl_datalistmodel.property.dl_todoNotes.title=Notas
dl_datalistmodel.association.dl_assignee.title=Destinat\u00e1rio
dl_datalistmodel.association.dl_attachments.title=Anexos
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=Data de in\u00edcio
dl_datalistmodel.property.dl_ganttEndDate.title=Data de t\u00e9rmino
dl_datalistmodel.property.dl_ganttPercentComplete.title=% Completa
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=Lista de tarefas (avan\u00e7ada)
dl_datalistmodel.type.dl_task.description=Lista de tarefas avan\u00e7ada, incluindo t\u00edtulo, descri\u00e7\u00e3o, datas de in\u00edcio e t\u00e9rmino, prioridade, status, coment\u00e1rios, destinat\u00e1rios e anexos.
dl_datalistmodel.property.dl_taskPriority.title=Prioridade
dl_datalistmodel.property.dl_taskStatus.title=Status
dl_datalistmodel.property.dl_taskComments.title=Coment\u00e1rios
dl_datalistmodel.association.dl_taskAssignee.title=Destinat\u00e1rio
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=Lista de tarefas (simples)
dl_datalistmodel.type.dl_simpletask.description=Lista de tarefas simples, incluindo t\u00edtulo, descri\u00e7\u00e3o, prazo, prioridade, status e coment\u00e1rios.
dl_datalistmodel.property.dl_simpletaskDueDate.title=Data de vencimento
dl_datalistmodel.property.dl_simpletaskPriority.title=Prioridade
dl_datalistmodel.property.dl_simpletaskStatus.title=Status
dl_datalistmodel.property.dl_simpletaskComments.title=Coment\u00e1rios
# Contact
dl_datalistmodel.type.dl_contact.title=Lista de contatos
dl_datalistmodel.type.dl_contact.description=Lista de contatos, incluindo o nome, sobrenome, nome completo, email, cargo, telefone (escrit\u00f3rio) e telefone (celular).
dl_datalistmodel.property.dl_contactFirstName.title=Nome
dl_datalistmodel.property.dl_contactLastName.title=Sobrenome
dl_datalistmodel.property.dl_contactEmail.title=Email
dl_datalistmodel.property.dl_contactCompany.title=Empresa
dl_datalistmodel.property.dl_contactJobTitle.title=Cargo
dl_datalistmodel.property.dl_contactPhoneOffice.title=Telefone (escrit\u00f3rio)
dl_datalistmodel.property.dl_contactPhoneMobile.title=Telefone (celular)
dl_datalistmodel.property.dl_contactNotes.title=Notas
# Issues
dl_datalistmodel.type.dl_issue.title=Lista de problemas
dl_datalistmodel.type.dl_issue.description=Lista de problemas, incluindo ID, status, prioridade, descri\u00e7\u00e3o, prazo, coment\u00e1rios, atribuir e problemas relacionados.
dl_datalistmodel.property.dl_issueID.title=ID do problema
dl_datalistmodel.property.dl_issueStatus.title=Status
dl_datalistmodel.property.dl_issuePriority.title=Prioridade
dl_datalistmodel.property.dl_issueDescription.title=Descri\u00e7\u00e3o
dl_datalistmodel.property.dl_issueDueDate.title=Data de vencimento
dl_datalistmodel.property.dl_issueComments.title=Coment\u00e1rios
dl_datalistmodel.association.dl_issueAssignedTo.title=Atribu\u00eddo para
dl_datalistmodel.property.dl_issueRelatedIssues.title=Problemas relacionados
# Event
dl_datalistmodel.type.dl_event.title=Lista de eventos
dl_datalistmodel.type.dl_event.description=Lista de eventos incluindo t\u00edtulo, descri\u00e7\u00e3o, localiza\u00e7\u00e3o e data/hora de in\u00edcio e t\u00e9rmino.
dl_datalistmodel.property.dl_eventLocation.title=Localiza\u00e7\u00e3o
dl_datalistmodel.property.dl_eventStartDate.title=Data de in\u00edcio
dl_datalistmodel.property.dl_eventEndDate.title=Data de t\u00e9rmino
dl_datalistmodel.property.dl_eventRegistrations.title=Registros
dl_datalistmodel.property.dl_eventNote.title=Notas
# Location
dl_datalistmodel.type.dl_location.title=Lista de localiza\u00e7\u00e3o
dl_datalistmodel.type.dl_location.description=Lista de localiza\u00e7\u00f5es/endere\u00e7os
dl_datalistmodel.property.dl_locationAddress1.title=Endere\u00e7o, linha 1
dl_datalistmodel.property.dl_locationAddress2.title=Endere\u00e7o, linha 2
dl_datalistmodel.property.dl_locationAddress3.title=Endere\u00e7o, linha 3
dl_datalistmodel.property.dl_locationZip.title=C\u00f3digo postal/CEP
dl_datalistmodel.property.dl_locationState.title=Estado/munic\u00edpio
dl_datalistmodel.property.dl_locationCountry.title=Pa\u00eds
dl_datalistmodel.property.dl_locationNote.title=Notas
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=Agenda de reuni\u00e3o
dl_datalistmodel.type.dl_meetingAgenda.description=Gerencie itens de agenda de reuni\u00e3o, incluindo descri\u00e7\u00e3o, propriet\u00e1rio e tempo alocado.
dl_datalistmodel.property.dl_meetingAgendaRef.title=Refer\u00eancia
dl_datalistmodel.property.dl_meetingAgendaTime.title=Tempo (minutos)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=Propriet\u00e1rio
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=Agenda de evento
dl_datalistmodel.type.dl_eventAgenda.description=Gerencie itens de agenda de evento, incluindo nomes de sess\u00e3o, apresentadores e horas de in\u00edcio e t\u00e9rmino.
dl_datalistmodel.property.dl_eventAgendaRef.title=Refer\u00eancia
dl_datalistmodel.property.dl_eventAgendaStartTime.title=Hora de in\u00edcio
dl_datalistmodel.property.dl_eventAgendaEndTime.title=Hora de t\u00e9rmino
dl_datalistmodel.property.dl_eventAgendaSessionName.title=Nome da sess\u00e3o
dl_datalistmodel.property.dl_eventAgendaPresenter.title=Apresentador
dl_datalistmodel.property.dl_eventAgendaAudience.title=P\u00fablico
dl_datalistmodel.property.dl_eventAgendaNotes.title=Notas
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=N\u00e3o iniciado
listconstraint.dl_task_status.In\ Progress=Em andamento
listconstraint.dl_task_status.On\ Hold=Em espera
listconstraint.dl_task_status.Complete=Conclu\u00eddo
listconstraint.dl_priority_value.High=Alto
listconstraint.dl_priority_value.Normal=Normal
listconstraint.dl_priority_value.Low=Baixo

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Alfresco Share
dl_datalistmodel.type.dl_dataList.title=\u0422\u0438\u043f \u043f\u0430\u043f\u043a\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445
dl_datalistmodel.type.dl_dataList.description=\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u0430, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 dl:dataListItemType.
dl_datalistmodel.property.dl_dataListItemType.title=\u0422\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445
dl_datalistmodel.property.dl_dataListItemType.description=\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0442\u0438\u043f dl:dataListItem \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.
dl_datalistmodel.type.dl_dataListItem.title=\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0438\u043f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445
dl_datalistmodel.type.dl_dataListItem.description=\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0438\u043f, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0438\u043f\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=\u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b
dl_datalistmodel.type.dl_todoList.description=\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f\u043c\u0438.
dl_datalistmodel.property.dl_todoTitle.title=\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a
dl_datalistmodel.property.dl_todoDueDate.title=\u0421\u0440\u043e\u043a
dl_datalistmodel.property.dl_todoPriority.title=\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442
dl_datalistmodel.property.dl_todoStatus.title=\u0421\u0442\u0430\u0442\u0443\u0441
dl_datalistmodel.property.dl_todoNotes.title=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f
dl_datalistmodel.association.dl_assignee.title=\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c
dl_datalistmodel.association.dl_attachments.title=\u0412\u043b\u043e\u0436\u0435\u043d\u0438\u044f
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=\u0414\u0430\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u0430
dl_datalistmodel.property.dl_ganttEndDate.title=\u0414\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f
dl_datalistmodel.property.dl_ganttPercentComplete.title=\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e %
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447 (\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439)
dl_datalistmodel.type.dl_task.description=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0434\u0430\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043a\u043e\u043d\u0446\u0430, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u0441\u0442\u0430\u0442\u0443\u0441, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f.
dl_datalistmodel.property.dl_taskPriority.title=\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442
dl_datalistmodel.property.dl_taskStatus.title=\u0421\u0442\u0430\u0442\u0443\u0441
dl_datalistmodel.property.dl_taskComments.title=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438
dl_datalistmodel.association.dl_taskAssignee.title=\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447 (\u043f\u0440\u043e\u0441\u0442\u043e\u0439)
dl_datalistmodel.type.dl_simpletask.description=\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0441\u0440\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u0441\u0442\u0430\u0442\u0443\u0441, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.
dl_datalistmodel.property.dl_simpletaskDueDate.title=\u0421\u0440\u043e\u043a
dl_datalistmodel.property.dl_simpletaskPriority.title=\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442
dl_datalistmodel.property.dl_simpletaskStatus.title=\u0421\u0442\u0430\u0442\u0443\u0441
dl_datalistmodel.property.dl_simpletaskComments.title=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438
# Contact
dl_datalistmodel.type.dl_contact.title=\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432
dl_datalistmodel.type.dl_contact.description=\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0438\u043c\u044f, \u0444\u0430\u043c\u0438\u043b\u0438\u044e, \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b, \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 (\u043e\u0444\u0438\u0441), \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 (\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e).
dl_datalistmodel.property.dl_contactFirstName.title=\u0418\u043c\u044f
dl_datalistmodel.property.dl_contactLastName.title=\u0424\u0430\u043c\u0438\u043b\u0438\u044f
dl_datalistmodel.property.dl_contactEmail.title=\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430
dl_datalistmodel.property.dl_contactCompany.title=\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f
dl_datalistmodel.property.dl_contactJobTitle.title=\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c
dl_datalistmodel.property.dl_contactPhoneOffice.title=\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 (\u043e\u0444\u0438\u0441)
dl_datalistmodel.property.dl_contactPhoneMobile.title=\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 (\u043c\u043e\u0431)
dl_datalistmodel.property.dl_contactNotes.title=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f
# Issues
dl_datalistmodel.type.dl_issue.title=\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432
dl_datalistmodel.type.dl_issue.description=\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0441\u0442\u0430\u0442\u0443\u0441, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0441\u0440\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.
dl_datalistmodel.property.dl_issueID.title=\u041d\u043e\u043c\u0435\u0440 \u0432\u043e\u043f\u0440\u043e\u0441\u0430
dl_datalistmodel.property.dl_issueStatus.title=\u0421\u0442\u0430\u0442\u0443\u0441
dl_datalistmodel.property.dl_issuePriority.title=\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442
dl_datalistmodel.property.dl_issueDescription.title=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435
dl_datalistmodel.property.dl_issueDueDate.title=\u0421\u0440\u043e\u043a
dl_datalistmodel.property.dl_issueComments.title=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438
dl_datalistmodel.association.dl_issueAssignedTo.title=\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e
dl_datalistmodel.property.dl_issueRelatedIssues.title=\u0421\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b
# Event
dl_datalistmodel.type.dl_event.title=\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439
dl_datalistmodel.type.dl_event.description=\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0434\u0430\u0442\u0443/\u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f.
dl_datalistmodel.property.dl_eventLocation.title=\u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435
dl_datalistmodel.property.dl_eventStartDate.title=\u0414\u0430\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u0430
dl_datalistmodel.property.dl_eventEndDate.title=\u0414\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f
dl_datalistmodel.property.dl_eventRegistrations.title=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438
dl_datalistmodel.property.dl_eventNote.title=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f
# Location
dl_datalistmodel.type.dl_location.title=\u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439
dl_datalistmodel.type.dl_location.description=\u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439/\u0430\u0434\u0440\u0435\u0441\u043e\u0432
dl_datalistmodel.property.dl_locationAddress1.title=\u0410\u0434\u0440\u0435\u0441 (\u0441\u0442\u0440\u043e\u043a\u0430 1)
dl_datalistmodel.property.dl_locationAddress2.title=\u0410\u0434\u0440\u0435\u0441 (\u0441\u0442\u0440\u043e\u043a\u0430 2)
dl_datalistmodel.property.dl_locationAddress3.title=\u0410\u0434\u0440\u0435\u0441 (\u0441\u0442\u0440\u043e\u043a\u0430 3)
dl_datalistmodel.property.dl_locationZip.title=\u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441
dl_datalistmodel.property.dl_locationState.title=\u041e\u0431\u043b\u0430\u0441\u0442\u044c
dl_datalistmodel.property.dl_locationCountry.title=\u0421\u0442\u0440\u0430\u043d\u0430
dl_datalistmodel.property.dl_locationNote.title=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0438\u044f
dl_datalistmodel.type.dl_meetingAgenda.description=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u043e\u0431\u0440\u0430\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.
dl_datalistmodel.property.dl_meetingAgendaRef.title=\u0421\u0441\u044b\u043b\u043a\u0430
dl_datalistmodel.property.dl_meetingAgendaTime.title=\u0412\u0440\u0435\u043c\u044f (\u043c\u0438\u043d.)
dl_datalistmodel.property.dl_meetingAgendaOwner.title=\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f
dl_datalistmodel.type.dl_eventAgenda.description=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432, \u0438\u043c\u0435\u043d\u0430 \u0434\u043e\u043a\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u0432, \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432.
dl_datalistmodel.property.dl_eventAgendaRef.title=\u0421\u0441\u044b\u043b\u043a\u0430
dl_datalistmodel.property.dl_eventAgendaStartTime.title=\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430
dl_datalistmodel.property.dl_eventAgendaEndTime.title=\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f
dl_datalistmodel.property.dl_eventAgendaSessionName.title=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u0430
dl_datalistmodel.property.dl_eventAgendaPresenter.title=\u0414\u043e\u043a\u043b\u0430\u0434\u0447\u0438\u043a
dl_datalistmodel.property.dl_eventAgendaAudience.title=\u0410\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f
dl_datalistmodel.property.dl_eventAgendaNotes.title=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=\u041d\u0435 \u043d\u0430\u0447\u0430\u0442\u043e
listconstraint.dl_task_status.In\ Progress=\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435
listconstraint.dl_task_status.On\ Hold=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0430
listconstraint.dl_task_status.Complete=\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e
listconstraint.dl_priority_value.High=\u0412\u044b\u0441\u043e\u043a\u0438\u0439
listconstraint.dl_priority_value.Normal=\u0421\u0440\u0435\u0434\u043d\u0438\u0439
listconstraint.dl_priority_value.Low=\u041d\u0438\u0437\u043a\u0438\u0439

View File

@@ -0,0 +1,114 @@
# Display labels for Share Data Lists Model
dl_datalistmodel.description=Alfresco Share \u6570\u636e\u5217\u8868\u6a21\u578b
dl_datalistmodel.type.dl_dataList.title=\u6570\u636e\u5217\u8868\u6587\u4ef6\u5939\u7c7b\u578b
dl_datalistmodel.type.dl_dataList.description=\u7528\u4e8e\u5b58\u50a8 dl:dataListItemType \u5c5e\u6027\u4e2d\u6307\u5b9a\u7c7b\u578b\u7684\u6570\u636e\u5217\u8868\u9879\u3002
dl_datalistmodel.property.dl_dataListItemType.title=\u6570\u636e\u5217\u8868\u9879\u7c7b\u578b
dl_datalistmodel.property.dl_dataListItemType.description=\u7528\u4e8e\u786e\u5b9a\u5728\u6570\u636e\u5217\u8868\u5185\u65b0\u5efa\u9879\u65f6\u5c06\u4f7f\u7528\u7684\u54ea\u79cd dl:dataListItem \u7684\u5b50\u7c7b\u578b\u3002
dl_datalistmodel.type.dl_dataListItem.title=\u6570\u636e\u5217\u8868\u7236\u7c7b\u578b
dl_datalistmodel.type.dl_dataListItem.description=\u6d3e\u751f\u6837\u672c\u6570\u636e\u5217\u8868\u9879\u7c7b\u578b\u7684\u6765\u6e90\u7236\u7c7b\u578b\u3002
## Simple "To do" List
dl_datalistmodel.type.dl_todoList.title=\u4ee3\u529e\u4e8b\u5b9c\u5217\u8868
dl_datalistmodel.type.dl_todoList.description=\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u529e\u4e8b\u5b9c\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u53ef\u9009\u7684\u88ab\u6307\u6d3e\u8005\u3002
dl_datalistmodel.property.dl_todoTitle.title=\u6807\u9898
dl_datalistmodel.property.dl_todoDueDate.title=\u622a\u6b62\u65e5\u671f
dl_datalistmodel.property.dl_todoPriority.title=\u4f18\u5148\u7ea7
dl_datalistmodel.property.dl_todoStatus.title=\u72b6\u6001
dl_datalistmodel.property.dl_todoNotes.title=\u8bf4\u660e
dl_datalistmodel.association.dl_assignee.title=\u88ab\u6307\u6d3e\u8005
dl_datalistmodel.association.dl_attachments.title=\u9644\u4ef6
# Gantt Aspect
dl_datalistmodel.property.dl_ganttStartDate.title=\u5f00\u59cb\u65e5\u671f
dl_datalistmodel.property.dl_ganttEndDate.title=\u7ed3\u675f\u65e5\u671f
dl_datalistmodel.property.dl_ganttPercentComplete.title=\u5b8c\u6210\u767e\u5206\u6bd4
# Task List (Advanced)
dl_datalistmodel.type.dl_task.title=\u4efb\u52a1\u5217\u8868\uff08\u9ad8\u7ea7\uff09
dl_datalistmodel.type.dl_task.description=\u9ad8\u7ea7\u4efb\u52a1\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u6807\u9898\u3001\u8bf4\u660e\u3001\u5f00\u59cb\u65e5\u671f\u4e0e\u7ed3\u675f\u65e5\u671f\u3001\u4f18\u5148\u7ea7\u3001\u72b6\u6001\u3001\u6ce8\u91ca\u3001\u88ab\u6307\u6d3e\u8005\u4ee5\u53ca\u9644\u4ef6\u3002
dl_datalistmodel.property.dl_taskPriority.title=\u4f18\u5148\u7ea7
dl_datalistmodel.property.dl_taskStatus.title=\u72b6\u6001
dl_datalistmodel.property.dl_taskComments.title=\u8bc4\u8bba
dl_datalistmodel.association.dl_taskAssignee.title=\u88ab\u6307\u6d3e\u8005
# Task List (Simple)
dl_datalistmodel.type.dl_simpletask.title=\u4efb\u52a1\u5217\u8868\uff08\u7b80\u5355\uff09
dl_datalistmodel.type.dl_simpletask.description=\u7b80\u5355\u4efb\u52a1\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u6807\u9898\u3001\u8bf4\u660e\u3001\u622a\u6b62\u65e5\u671f\u3001\u4f18\u5148\u7ea7\u3001\u72b6\u6001\u4ee5\u53ca\u6ce8\u91ca\u3002
dl_datalistmodel.property.dl_simpletaskDueDate.title=\u622a\u6b62\u65e5\u671f
dl_datalistmodel.property.dl_simpletaskPriority.title=\u4f18\u5148\u7ea7
dl_datalistmodel.property.dl_simpletaskStatus.title=\u72b6\u6001
dl_datalistmodel.property.dl_simpletaskComments.title=\u8bc4\u8bba
# Contact
dl_datalistmodel.type.dl_contact.title=\u8054\u7cfb\u4eba\u5217\u8868
dl_datalistmodel.type.dl_contact.description=\u8054\u7cfb\u4eba\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u540d\u5b57\u3001\u59d3\u6c0f\u3001\u5168\u540d\u3001\u7535\u5b50\u90ae\u4ef6\u3001\u804c\u4f4d\u3001\u7535\u8bdd\u53f7\u7801\uff08\u529e\u516c\u5ba4\u5ea7\u673a\uff09\u4ee5\u53ca\u7535\u8bdd\u53f7\u7801\uff08\u79fb\u52a8\u7535\u8bdd\uff09\u3002
dl_datalistmodel.property.dl_contactFirstName.title=\u540d\u5b57
dl_datalistmodel.property.dl_contactLastName.title=\u59d3\u6c0f
dl_datalistmodel.property.dl_contactEmail.title=\u7535\u5b50\u90ae\u4ef6
dl_datalistmodel.property.dl_contactCompany.title=\u516c\u53f8
dl_datalistmodel.property.dl_contactJobTitle.title=\u804c\u4f4d
dl_datalistmodel.property.dl_contactPhoneOffice.title=\u7535\u8bdd\u53f7\u7801\uff08\u529e\u516c\u5ba4\u5ea7\u673a\uff09
dl_datalistmodel.property.dl_contactPhoneMobile.title=\u7535\u8bdd\u53f7\u7801\uff08\u79fb\u52a8\u7535\u8bdd\uff09
dl_datalistmodel.property.dl_contactNotes.title=\u8bf4\u660e
# Issues
dl_datalistmodel.type.dl_issue.title=\u95ee\u9898\u5217\u8868
dl_datalistmodel.type.dl_issue.description=\u95ee\u9898\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b ID\u3001\u72b6\u6001\u3001\u4f18\u5148\u7ea7\u3001\u8bf4\u660e\u3001\u622a\u6b62\u65e5\u671f\u3001\u6ce8\u91ca\u3001\u6307\u6d3e\u5bf9\u8c61\u4ee5\u53ca\u76f8\u5173\u95ee\u9898\u3002
dl_datalistmodel.property.dl_issueID.title=\u95ee\u9898 ID
dl_datalistmodel.property.dl_issueStatus.title=\u72b6\u6001
dl_datalistmodel.property.dl_issuePriority.title=\u4f18\u5148\u7ea7
dl_datalistmodel.property.dl_issueDescription.title=\u8bf4\u660e
dl_datalistmodel.property.dl_issueDueDate.title=\u622a\u6b62\u65e5\u671f
dl_datalistmodel.property.dl_issueComments.title=\u8bc4\u8bba
dl_datalistmodel.association.dl_issueAssignedTo.title=\u88ab\u6307\u6d3e\u7ed9
dl_datalistmodel.property.dl_issueRelatedIssues.title=\u76f8\u5173\u95ee\u9898
# Event
dl_datalistmodel.type.dl_event.title=\u4e8b\u4ef6\u5217\u8868
dl_datalistmodel.type.dl_event.description=\u4e8b\u4ef6\u5217\u8868\uff0c\u5176\u4e2d\u5305\u542b\u6807\u9898\u3001\u8bf4\u660e\u3001\u4f4d\u7f6e\uff0c\u4ee5\u53ca\u5f00\u59cb\u548c\u7ed3\u675f\u65e5\u671f/\u65f6\u95f4\u3002
dl_datalistmodel.property.dl_eventLocation.title=\u4f4d\u7f6e
dl_datalistmodel.property.dl_eventStartDate.title=\u5f00\u59cb\u65e5\u671f
dl_datalistmodel.property.dl_eventEndDate.title=\u7ed3\u675f\u65e5\u671f
dl_datalistmodel.property.dl_eventRegistrations.title=\u6ce8\u518c
dl_datalistmodel.property.dl_eventNote.title=\u8bf4\u660e
# Location
dl_datalistmodel.type.dl_location.title=\u4f4d\u7f6e\u5217\u8868
dl_datalistmodel.type.dl_location.description=\u4f4d\u7f6e/\u5730\u5740\u5217\u8868
dl_datalistmodel.property.dl_locationAddress1.title=\u5730\u5740\u7b2c 1 \u884c
dl_datalistmodel.property.dl_locationAddress2.title=\u5730\u5740\u7b2c 2 \u884c
dl_datalistmodel.property.dl_locationAddress3.title=\u5730\u5740\u7b2c 3 \u884c
dl_datalistmodel.property.dl_locationZip.title=\u90ae\u653f\u7f16\u7801
dl_datalistmodel.property.dl_locationState.title=\u7701/\u76f4\u8f96\u5e02/\u81ea\u6cbb\u533a
dl_datalistmodel.property.dl_locationCountry.title=\u56fd\u5bb6/\u5730\u533a
dl_datalistmodel.property.dl_locationNote.title=\u8bf4\u660e
# Meeting Agenda
dl_datalistmodel.type.dl_meetingAgenda.title=\u4f1a\u8bae\u8bae\u7a0b
dl_datalistmodel.type.dl_meetingAgenda.description=\u7ba1\u7406\u4f1a\u8bae\u8bae\u7a0b\u9879\uff0c\u5176\u4e2d\u5305\u62ec\u8bf4\u660e\u3001\u6240\u6709\u8005\uff0c\u4ee5\u53ca\u5206\u914d\u7684\u65f6\u95f4\u3002
dl_datalistmodel.property.dl_meetingAgendaRef.title=\u5f15\u7528
dl_datalistmodel.property.dl_meetingAgendaTime.title=\u65f6\u95f4\uff08\u5206\u949f\uff09
dl_datalistmodel.property.dl_meetingAgendaOwner.title=\u6240\u6709\u8005
# Event Agenda
dl_datalistmodel.type.dl_eventAgenda.title=\u4e8b\u4ef6\u65e5\u7a0b
dl_datalistmodel.type.dl_eventAgenda.description=\u7ba1\u7406\u4e8b\u4ef6\u65e5\u7a0b\uff0c\u5305\u62ec\u4f1a\u8bdd\u540d\u79f0\u3001\u6f14\u793a\u8005\uff0c\u4ee5\u53ca\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u95f4\u3002
dl_datalistmodel.property.dl_eventAgendaRef.title=\u5f15\u7528
dl_datalistmodel.property.dl_eventAgendaStartTime.title=\u5f00\u59cb\u65f6\u95f4
dl_datalistmodel.property.dl_eventAgendaEndTime.title=\u7ed3\u675f\u65f6\u95f4
dl_datalistmodel.property.dl_eventAgendaSessionName.title=\u4f1a\u8bdd\u540d\u79f0
dl_datalistmodel.property.dl_eventAgendaPresenter.title=\u6f14\u793a\u8005
dl_datalistmodel.property.dl_eventAgendaAudience.title=\u89c2\u4f17
dl_datalistmodel.property.dl_eventAgendaNotes.title=\u8bf4\u660e
# List constraint display labels
listconstraint.dl_task_status.Not\ Started=\u672a\u5f00\u59cb
listconstraint.dl_task_status.In\ Progress=\u6b63\u5728\u8fdb\u884c
listconstraint.dl_task_status.On\ Hold=\u4fdd\u5b58\u4e2d
listconstraint.dl_task_status.Complete=\u5b8c\u6210
listconstraint.dl_priority_value.High=\u9ad8
listconstraint.dl_priority_value.Normal=\u6b63\u5e38
listconstraint.dl_priority_value.Low=\u4f4e

View File

@@ -0,0 +1,494 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of Share Data Lists Model -->
<!-- Note: the dl: namespace is defined further on in the document -->
<model name="dl:datalistmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Meta-data about the model -->
<description>Alfresco Share Data List Model</description>
<author>Mike Hatfield</author>
<version>0.1</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
</imports>
<!-- Data List Namespace -->
<namespaces>
<namespace uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
</namespaces>
<constraints>
<constraint name="dl:task_status" type="LIST">
<parameter name="allowedValues">
<list>
<value>Not Started</value>
<value>In Progress</value>
<value>Complete</value>
<value>On Hold</value>
</list>
</parameter>
</constraint>
<constraint name="dl:priority_value" type="LIST">
<parameter name="allowedValues">
<list>
<value>High</value>
<value>Normal</value>
<value>Low</value>
</list>
</parameter>
</constraint>
<constraint name="dl:percentage" type="MINMAX">
<parameter name="minValue">
<value>0</value>
</parameter>
<parameter name="maxValue">
<value>100</value>
</parameter>
</constraint>
</constraints>
<types>
<!-- Data List - Container. DO NOT MODIFY -->
<type name="dl:dataList">
<title>Data List container type</title>
<parent>cm:folder</parent>
<properties>
<property name="dl:dataListItemType">
<title>List Item Type</title>
<description>Determines which Data Dictionary type will be used when create new items within the Data List.</description>
<type>d:text</type>
</property>
</properties>
</type>
<!-- Data List - Data Item Base Type. DO NOT MODIFY -->
<type name="dl:dataListItem">
<title>Data List parent type</title>
<parent>cm:content</parent>
</type>
<!-- Data List - Simple "To do" list -->
<type name="dl:todoList">
<title>To Do List</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:todoTitle">
<title>Title</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="dl:todoDueDate">
<title>Due Date</title>
<type>d:datetime</type>
<mandatory>false</mandatory>
</property>
<property name="dl:todoPriority">
<title>Priority</title>
<type>d:int</type>
<mandatory>false</mandatory>
</property>
<property name="dl:todoStatus">
<title>Status</title>
<type>d:text</type>
<default>Not Started</default>
<constraints>
<constraint ref="dl:task_status" />
</constraints>
</property>
<property name="dl:todoNotes">
<title>Notes</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<associations>
<association name="dl:assignee">
<title>Assignee</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
<association name="dl:attachments">
<title>Attachments</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:cmobject</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</type>
<!-- Data List - Simple Tasks List -->
<type name="dl:simpletask">
<title>Task List (Simple)</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:simpletaskDueDate">
<title>Due Date</title>
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="dl:simpletaskPriority">
<title>Priority</title>
<type>d:text</type>
<default>Normal</default>
<constraints>
<constraint ref="dl:priority_value" />
</constraints>
</property>
<property name="dl:simpletaskStatus">
<title>Status</title>
<type>d:text</type>
<default>Not Started</default>
<constraints>
<constraint ref="dl:task_status" />
</constraints>
</property>
<property name="dl:simpletaskComments">
<title>Comments</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:titled</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Advanced Tasks List -->
<type name="dl:task">
<title>Task List (Advanced)</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:taskPriority">
<title>Priority</title>
<type>d:text</type>
<default>Normal</default>
<constraints>
<constraint ref="dl:priority_value" />
</constraints>
</property>
<property name="dl:taskStatus">
<title>Status</title>
<type>d:text</type>
<default>Not Started</default>
<constraints>
<constraint ref="dl:task_status" />
</constraints>
</property>
<property name="dl:taskComments">
<title>Comments</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<associations>
<association name="dl:taskAssignee">
<title>Assignee</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:titled</aspect>
<aspect>cm:attachable</aspect>
<aspect>dl:gantt</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Contact List -->
<type name="dl:contact">
<title>Contacts List</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:contactFirstName">
<title>First Name</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactLastName">
<title>Last Name</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactEmail">
<title>Email Address</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactCompany">
<title>Company</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactJobTitle">
<title>Job Title</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactPhoneOffice">
<title>Phone (Office)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactPhoneMobile">
<title>Phone (Mobile)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:contactNotes">
<title>Notes</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
</type>
<!-- Data List - Issue List -->
<type name="dl:issue">
<title>Issues List</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:issueID">
<title>Issue ID</title>
<type>d:text</type>
</property>
<property name="dl:issueStatus">
<title>Status</title>
<type>d:text</type>
<default>Not Started</default>
<constraints>
<constraint ref="dl:task_status" />
</constraints>
</property>
<property name="dl:issuePriority">
<title>Priority</title>
<type>d:text</type>
<default>Normal</default>
<constraints>
<constraint ref="dl:priority_value" />
</constraints>
</property>
<property name="dl:issueDueDate">
<title>Due Date</title>
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="dl:issueComments">
<title>Comments</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<associations>
<association name="dl:issueAssignedTo">
<title>Assigned To</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:titled</aspect>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Event List -->
<type name="dl:event">
<title>Event</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:eventLocation">
<title>Location</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:eventNote">
<title>Notes</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dl:eventStartDate">
<title>Start Date</title>
<type>d:datetime</type>
<mandatory>false</mandatory>
</property>
<property name="dl:eventEndDate">
<title>End Date</title>
<type>d:datetime</type>
<mandatory>false</mandatory>
</property>
<property name="dl:eventRegistrations">
<title>Registrations</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:titled</aspect>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Location List -->
<type name="dl:location">
<title>Location</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:locationAddress1">
<title>Address 1</title>
<type>d:text</type>
</property>
<property name="dl:locationAddress2">
<title>Address 2</title>
<type>d:text</type>
</property>
<property name="dl:locationAddress3">
<title>Address 3</title>
<type>d:text</type>
</property>
<property name="dl:locationZip">
<title>Zip/Post Code</title>
<type>d:text</type>
</property>
<property name="dl:locationState">
<title>State/County</title>
<type>d:text</type>
</property>
<property name="dl:locationCountry">
<title>Country</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:titled</aspect>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Meeting Agenda List -->
<type name="dl:meetingAgenda">
<title>Meeting Agenda</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:meetingAgendaRef">
<title>Reference</title>
<type>d:text</type>
</property>
<property name="dl:meetingAgendaTime">
<title>Time (Mins)</title>
<type>d:text</type>
</property>
<property name="dl:meetingAgendaOwner">
<title>Owner</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:titled</aspect>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
<!-- Data List - Event Agenda List -->
<type name="dl:eventAgenda">
<title>Event Agenda</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="dl:eventAgendaRef">
<title>Reference</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaStartTime">
<title>Start Time</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaEndTime">
<title>End Timie</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaSessionName">
<title>Session Name</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaPresenter">
<title>Presenter</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaAudience">
<title>Audience</title>
<type>d:text</type>
</property>
<property name="dl:eventAgendaNotes">
<title>Notes</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:attachable</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<aspect name="dl:gantt">
<title>Gantt</title>
<properties>
<property name="dl:ganttStartDate">
<title>Start Date</title>
<type>d:date</type>
</property>
<property name="dl:ganttEndDate">
<title>End Date</title>
<type>d:date</type>
</property>
<property name="dl:ganttPercentComplete">
<title>% Complete</title>
<type>d:int</type>
<mandatory>true</mandatory>
<default>0</default>
<constraints>
<constraint ref="dl:percentage" />
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>Tagging Actions</shortname>
<description>Add and remove tags to nodes</description>
<url>/collaboration/tagActions</url>
<format default="html"/>
<authentication>user</authentication>
<transaction>required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,52 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Tagging Test UI</title>
<style>
body {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
}
.label {
float: left;
width: 10em;
}
.data {
float: left;
}
.field {
clear: left;
float: left;
padding: 8px;
}
.action {
color: green;
font-weight: bold;
float: left;
clear: both;
}
</style>
</head>
<body>
<h3>Tagging Test UI</h3>
<form action="${url.serviceContext}${url.match}" method="post">
<div class="field">
<span class="label">Space nodeRef:</span>
<span class="data"><input type="text" name="n" size="64" /><br />e.g. &quot;e3741425-35cf-11dc-9762-4b73d0280543&quot;</span>
</div>
<div class="field">
<span class="label">Tag:</span>
<span class="data"><input type="text" name="t" size="64" value="" /></span>
</div>
<div class="field">
<span><input type="submit" value="Add" name="add" /></span>
<span><input type="submit" value="Remove" name="remove" /></span>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>Tagging Actions</shortname>
<description>Add and remove tags to nodes</description>
<url>/collaboration/tagActions</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,150 @@
model.tagActions = tagActions(args.a, args.n, args.t);
function tagActions(action, nodeId, tagName)
{
var resultString = "Action failed";
var resultCode = false;
var node = null;
var newTag = null;
var newTagNodeRef = "";
if ((tagName != "") && (tagName != null))
{
tagName = tagName.toLowerCase();
if (action == "add")
{
// Make sure the tag is in the repo
newTag = createTag(tagName);
if (newTag != null)
{
resultString = "Tag added";
resultCode = true;
newTagNodeRef = newTag.nodeRef.toString();
}
else
{
resultString = "Tag '" + tagName + "' not indexed";
}
}
// Adding/removing the tag to/from a node?
if ((nodeId != "") && (nodeId != null))
{
var node = search.findNode("workspace://SpacesStore/" + nodeId);
if (node != null)
{
try
{
var tags;
if (action == "add")
{
// Must have newTag node
if (newTag != null)
{
resultString = "Already tagged with '" + tagName + "'";
tags = node.properties["cm:taggable"];
if (tags == null)
{
tags = new Array();
}
// Check node doesn't already have this tag
var hasTag = false;
for each (tag in tags)
{
if (tag != null)
{
if (tag.name == tagName)
{
hasTag = true;
break;
}
}
}
if (!hasTag)
{
// Add it to our node
tags.push(newTag);
tagsArray = new Array();
tagsArray["cm:taggable"] = tags;
node.addAspect("cm:taggable", tagsArray);
resultString = "Document tagged";
resultCode = true;
}
}
}
else if (action == "remove")
{
resultString = "Could not remove tag";
var oldTags = node.properties["cm:taggable"];
if (oldTags == null)
{
oldTags = new Array();
}
tags = new Array();
// Find this tag
for each (tag in oldTags)
{
if (tag != null)
{
if (tag.name != tagName)
{
tags.push(tag);
}
}
}
// Removed tag?
if (oldTags.length > tags.length)
{
tagsArray = new Array();
tagsArray["cm:taggable"] = tags;
node.addAspect("cm:taggable", tagsArray);
resultString = "Tag removed";
resultCode = true;
}
else
{
resultString = "Not tagged with '" + tagName + "'";
}
}
else
{
resultString = "Unknown action";
}
}
catch(e)
{
resultString = "Action failed due to exception [" + e.toString() + "]";
}
}
}
}
var result =
{
"resultString": resultString,
"resultCode": resultCode,
"newTag": newTagNodeRef
};
return result;
}
/*
* Create a new tag if the passed-in one doesn't exist
*/
function createTag(tagName)
{
var existingTags = classification.getRootCategories("cm:taggable");
for each (existingTag in existingTags)
{
if (existingTag.name == tagName)
{
return existingTag;
}
}
var tagNode = classification.createRootCategory("cm:taggable", tagName);
return tagNode;
}

View File

@@ -0,0 +1,7 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"statusString": "${tagActions.resultString}",
"statusCode": ${tagActions.resultCode?string},
"newTag": "${tagActions.newTag?string}"
}
</#escape>

View File

@@ -0,0 +1,18 @@
<webscript>
<shortname>Tagging Query</shortname>
<description><![CDATA[
Query tag usage.
<br />
The following properties may be updated.
<dl>
<dt>nodeRef</dt><dd>nodeRef to anchor tag query from. Defaults to Company Home</dd>
<dt>maxResults</dt><dd>maximum number of results to return. Defaults to all results (limited by Lucene)</dd>
<dt>sortOrder</dt><dd>sort order for results. Possible values are: "name" (default), "count"</dd>
</dl>
]]></description>
<url>/collaboration/tagQuery?n={nodeRef?}&amp;m={maxResults?}&amp;s={sortOrder?}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,173 @@
function tagQuery()
{
var rootNode = args.n,
maxResults = args.m,
sortOrder = args.s,
tags = [],
countMin = Number.MAX_VALUE,
countMax = 0;
/* rootNode input */
var node = null;
if ((rootNode !== null) && (rootNode !== ""))
{
node = utils.resolveNodeReference(rootNode);
}
if (node === null)
{
node = companyhome;
}
/* maxResults input */
if ((maxResults === null) || (maxResults === ""))
{
maxResults = -1;
}
/* sortOrder input */
var validSortOrders =
{
"name": true,
"count": true
};
if (!(sortOrder in validSortOrders))
{
sortOrder = "name";
}
/* Query for tagged node(s) */
var query = "";
if (node !== companyhome)
{
query = "PATH:\"" + node.qnamePath;
if (node.isContainer)
{
query += "//*";
}
query += "\" AND ";
}
query += "ASPECT:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
//MNT-2118 Share inconsistencies when displaying locked files with tags
query += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
// MNT-20091 check to prevent cm:taggable with NULL
query += " AND ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
if (search.searchSubsystem.startsWith("solr"))
{
// MNT-11511: use facet search
var queryDef = {
query: query,
language: "lucene",
page: {
// query minimum rows because all usefull info will come with facets
maxItems: 1,
skipCount: 0
},
fieldFacets: [ "TAG" ]
};
var rs = search.queryResultSet(queryDef);
var tagFacets = rs.meta.facets.TAG;
for(var i=0; i < tagFacets.size(); i++)
{
var tagFacet = tagFacets.get(i);
tag =
{
name: tagFacet.facetValue,
count: tagFacet.hits,
toString: function()
{
return this.name;
}
};
tags.push(tag);
}
}
else
{
var taggedNodes = search.luceneSearch(query);
/* Build a hashtable of tags and tag count */
var tagHash = {},
count, taggedNode, tag, key;
for each (taggedNode in taggedNodes)
{
try
{
for each (tag in taggedNode.properties["cm:taggable"])
{
if (tag !== null)
{
count = tagHash[tag.name];
tagHash[tag.name] = count ? count+1 : 1;
}
}
}
catch (e)
{
continue;
}
}
/* Convert the hashtable into an array of objects */
for (key in tagHash)
{
tag =
{
name: key,
count: tagHash[key],
toString: function()
{
return this.name;
}
};
tags.push(tag);
}
}
if (tags.length === 0)
{
countMin = 0;
}
else
{
/* Sort the results by count (descending) */
tags.sort(sortByCountDesc);
/* Trim the results to maxResults if specified */
if (maxResults > -1)
{
tags = tags.slice(0, maxResults);
}
/* Calculate the min and max tag count values */
for each (tag in tags)
{
countMin = Math.min(countMin, tag.count);
countMax = Math.max(countMax, tag.count);
}
if (sortOrder == "name")
{
/* Sort the results by tag name (ascending) */
tags.sort();
}
}
var results =
{
"countMin": countMin,
"countMax": countMax,
"tags": tags
};
return results;
}
function sortByCountDesc(a, b)
{
return (b.count - a.count);
}
model.tagQuery = tagQuery();

View File

@@ -0,0 +1,10 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"countMin": ${tagQuery.countMin?c},
"countMax": ${tagQuery.countMax?c},
"tags":
[<#list tagQuery.tags as tag>
{ "name": "${tag.name}", "count": ${tag.count?c} }<#if tag_has_next>,</#if>
</#list>]
}
</#escape>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>Get the Share URL to View a Site Node</shortname>
<description>Gets the appropriate Share URL to view a given Site Node within Share</description>
<url>/api/sites/shareUrl</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,6 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"site": "${site.getShortName()}",
"url": "${url}"
}
</#escape>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>Create Activity</shortname>
<description>Share Generic Component - create activity data webscript</description>
<url>/slingshot/activity/create</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,184 @@
/**
* Share Generic Component: post new activity
*/
var m_node = null,
m_parentNode = null;
/* Posts to the activities service after a Share action */
function postActivity()
{
var data = {},
type = null,
siteId = null,
title = null,
appTool = null,
nodeRef = null,
parentNodeRef = null;
/*
* Activity Type
*/
if (json.has("type"))
{
type = json.get("type");
}
if (type == null || type.length === 0)
{
status.setCode(status.STATUS_BAD_REQUEST, "Activity 'type' parameter missing when posting activity");
return;
}
/*
* Site
*/
if (json.has("site"))
{
siteId = json.get("site");
}
if (siteId == null || siteId.length === 0)
{
status.setCode(status.STATUS_BAD_REQUEST, "'site' parameter missing when posting activity");
return;
}
// Check site existence
if (siteService.getSite(siteId) == null)
{
status.setCode(status.STATUS_BAD_REQUEST, "'" + siteId + "' is not a valid site");
return;
}
/**
* NodeRef & ParentNodeRef properties (must have at least one)
*/
if (json.has("nodeRef"))
{
nodeRef = json.get("nodeRef");
data.nodeRef = nodeRef;
m_node = search.findNode(nodeRef);
}
if (json.has("parentNodeRef"))
{
parentNodeRef = json.get("parentNodeRef");
data.parentNodeRef = parentNodeRef;
m_parentNode = search.findNode(parentNodeRef);
}
if (nodeRef == null && parentNodeRef == null)
{
status.setCode(status.STATUS_BAD_REQUEST, "Must specify either 'nodeRef' or 'parentNodeRef' parameter when posting activity");
return;
}
/**
* Title property
*/
if (json.has("title"))
{
title = json.get("title");
data.title = populateTokens(title);
}
if (title == null || title.length === 0)
{
status.setCode(status.STATUS_BAD_REQUEST, "Activity 'title' parameter missing when posting activity");
return;
}
/**
* AppTool (optional)
*/
if (json.has("appTool"))
{
appTool = json.get("appTool");
}
/**
* Page and page params (optional)
*/
if (json.has("page"))
{
data.page = populateTokens(json.get("page"));
}
try
{
// Log to activity service
activities.postActivity(type, siteId, appTool, jsonUtils.toJSONString(data));
}
catch(e)
{
if (logger.isLoggingEnabled())
{
logger.log(e);
}
}
}
/**
* Property token substution.
* Simplified version of YAHOO.lang.substitute()
*
* @method populateTokens
* @param s {string} String containing zero or more tokens of the form {token}
* <pre>
* {cm:name} Node's cm:name property
* {cm:name parent} Parent node's cm:name property
* </pre>
*/
function populateTokens(s)
{
var i, j, k, key, v, n, meta, saved=[], token,
SPACE = ' ', PARENT = 'parent', LBRACE = '{', RBRACE = '}',
dump, objstr;
for (;;)
{
i = s.lastIndexOf(LBRACE);
if (i < 0)
{
break;
}
j = s.indexOf(RBRACE, i);
if (i + 1 >= j)
{
break;
}
// Extract key and meta info
token = s.substring(i + 1, j);
key = token;
meta = null;
k = key.indexOf(SPACE);
if (k > -1)
{
meta = key.substring(k + 1).toLowerCase();
key = key.substring(0, k);
}
// Lookup the value
n = meta == PARENT ? m_parentNode : m_node;
v = null;
if (n != null)
{
v = n.properties[key];
}
if (v == null)
{
// This {block} has no replace string. Save it for later.
v = "~-" + saved.length + "-~";
saved[saved.length] = token;
}
s = s.substring(0, i) + v + s.substring(j + 1);
}
// restore saved {block}s
for (i = saved.length - 1; i >= 0; i = i - 1)
{
s = s.replace(new RegExp("~-" + i + "-~"), "{" + saved[i] + "}", "g");
}
return s;
}
postActivity();

View File

@@ -0,0 +1,4 @@
<logo>
<width>350</width>
<height>50</height>
</logo>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>Logo Upload</shortname>
<description>Upload logo file content</description>
<format default="json" />
<authentication>admin</authentication>
<transaction>required</transaction>
<url>/slingshot/application/uploadlogo</url>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,15 @@
<html>
<head>
<title>Upload Logo Success</title>
</head>
<body>
<#if (args.success!"")?matches("^[\\w\\d\\._]+$")>
<script type="text/javascript">
${args.success}({
nodeRef: "${logo.nodeRef}",
fileName: "${name}"
});
</script>
</#if>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<html>
<head>
<title>Upload Logo Failure</title>
</head>
<body>
<#if (args.failure!"")?matches("^[\\w\\d\\._]+$")>
<script type="text/javascript">
${args.failure}({
status: {
"code" : ${status.code},
"name" : "${status.codeName}",
"description" : "${status.codeDescription}"
},
message: "${jsonUtils.encodeJSONString(status.message)}"
});
</script>
</#if>
</body>
</html>

View File

@@ -0,0 +1,80 @@
/**
* Application Log Upload method
*
* @method POST
* @param filedata {file}
*/
function main()
{
try
{
var filename = null;
var content = null;
// locate file attributes
for each (field in formdata.fields)
{
if (field.name == "filedata" && field.isFile)
{
filename = field.filename;
content = field.content;
break;
}
}
// ensure all mandatory attributes have been located
if (filename == undefined || content == undefined)
{
status.code = 400;
status.message = msg.get("error.uploadMissing");
status.redirect = true;
return;
}
var sitesNode = companyhome.childrenByXPath("st:sites")[0];
if (sitesNode == null)
{
status.code = 500;
status.message = msg.get("error.sitesFolder");
status.redirect = true;
return;
}
var logoConfig = new XML(config.script);
var widthxheight = logoConfig.width + "x" + logoConfig.height;
var transformationOptions = "-resize " + widthxheight + "> -background none -gravity center";
// create the new image node
var nodeName = new Date().getTime() + "_" + filename;
var tmpFolder = sitesNode.createFolder(nodeName + "_tmp");
logoNode = sitesNode.createNode(nodeName, "cm:content");
logoNode.properties.content.write(content);
logoNode.properties.content.guessMimetype(filename);
var resizedImage = logoNode.transformImage(logoNode.properties.content.mimetype, transformationOptions, tmpFolder);
logoNode.properties.content.write(resizedImage.properties.content);
// CLOUD-951, no need to delete the resizedImage, as removing the tmpFolder will remove resizedImage too.
tmpFolder.remove();
logoNode.save();
// save ref to be returned
model.logo = logoNode;
model.name = filename;
}
catch (e)
{
var x = e;
status.code = 500;
status.message = msg.get("error.unexpected");
if (x.message && x.message.indexOf("org.alfresco.service.cmr.usage.ContentQuotaException") == 0)
{
status.code = 413;
status.message = x.message;
}
status.redirect = true;
return;
}
}
main();

View File

@@ -0,0 +1,12 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"nodeRef": "${logo.nodeRef}",
"fileName": "${name}",
"status":
{
"code": 200,
"name": "OK",
"description" : "File uploaded successfully"
}
}
</#escape>

View File

@@ -0,0 +1,3 @@
error.unexpected=Unexpected error occurred during upload of new content.
error.uploadMissing=Uploaded file cannot be located in request.
error.sitesFolder=Failed to locate Sites folder.

View File

@@ -0,0 +1,3 @@
error.unexpected=Unerwarteter Fehler beim Hochladen von neuem Inhalt.
error.uploadMissing=Hochgeladene Datei nicht in Anfrage gefunden.
error.sitesFolder=Sites-Ordner nicht gefunden.

View File

@@ -0,0 +1,3 @@
error.unexpected=Se ha producido un error inesperado durante la carga de nuevo contenido.
error.uploadMissing=El fichero cargado no puede localizarse en los datos enviados al servidor.
error.sitesFolder=No se pudo localizar la carpeta Sitios.

View File

@@ -0,0 +1,3 @@
error.unexpected=Une erreur inattendue s'est produite lors de l'importation de nouveau contenu.
error.uploadMissing=Impossible de trouver dans les donn\u00e9es le fichier import\u00e9.
error.sitesFolder=Impossible de situer le dossier Sites.

View File

@@ -0,0 +1,3 @@
error.unexpected=Si \u00e8 verificato un errore imprevisto durante il caricamento del nuovo contenuto.
error.uploadMissing=Impossibile trovare il file caricato nei dati inviati al server.
error.sitesFolder=Impossibile individuare la cartella Siti.

View File

@@ -0,0 +1,3 @@
error.unexpected=\u65b0\u3057\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u4e2d\u306b\u60f3\u5b9a\u5916\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
error.uploadMissing=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u30c7\u30fc\u30bf\u306e\u4e2d\u306b\u3042\u308a\u307e\u305b\u3093\u3002
error.sitesFolder=[\u30b5\u30a4\u30c8] \u30d5\u30a9\u30eb\u30c0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002

View File

@@ -0,0 +1,3 @@
error.unexpected=Uventet feil oppstod under opplasting av nytt innhold.
error.uploadMissing=Finner ikke opplastede fil fra foresp\u00f8rselen.
error.sitesFolder=Fant ikke stedsmappe.

View File

@@ -0,0 +1,3 @@
error.unexpected=Er is een onverwachte fout opgetreden bij het uploaden van nieuwe content.
error.uploadMissing=Kan het ge\u00fcploade bestand niet vinden in de aanvraag.
error.sitesFolder=Kan de map Sites niet vinden.

View File

@@ -0,0 +1,3 @@
error.unexpected=Um erro inesperado ocorreu durante o carregamento do novo conte\u00fado.
error.uploadMissing=O arquivo carregado n\u00e3o pode ser localizado no pedido.
error.sitesFolder=Falha na localiza\u00e7\u00e3o da pasta Locais.

View File

@@ -0,0 +1,3 @@
error.unexpected=\u0412 \u0445\u043e\u0434\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.
error.uploadMissing=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435.
error.sitesFolder=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 \u043f\u0430\u043f\u043a\u0443 \u0421\u0430\u0439\u0442\u044b.

View File

@@ -0,0 +1,3 @@
error.unexpected=\u4e0a\u4f20\u65b0\u5185\u5bb9\u671f\u95f4\u53d1\u751f\u610f\u5916\u9519\u8bef\u3002
error.uploadMissing=\u65e0\u6cd5\u5728\u8bf7\u6c42\u6570\u636e\u4e2d\u627e\u5230\u4e0a\u4f20\u7684\u6587\u4ef6\u3002
error.sitesFolder=\u65e0\u6cd5\u627e\u5230\u7ad9\u70b9\u6587\u4ef6\u5939\u3002

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>my-content</shortname>
<description>Content I'm Editing Dashlet Data Webscript</description>
<url>/slingshot/dashlets/my-contents</url>
<format default="json"></format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,46 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js">
/**
* Fetches all posts of the given blog
*/
function getDraftBlogPostList()
{
var q = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
" +PATH:\"/app:company_home/st:sites/*/cm:blog/*\"" +
" -ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\"" +
" +@cm\\:creator:\"" + person.properties.userName + '"';
nodes = search.luceneSearch(q, '@cm:modified', false, 3);
return processResults(nodes, 3);
}
function getWikiPages()
{
var q = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
" +PATH:\"/app:company_home/st:sites/*/cm:wiki/*\"" +
" +@cm\\:modifier:\"" + person.properties.userName + '"';
nodes = search.luceneSearch(q, '@cm:modified', false, 3);
return processResults(nodes, 3);
}
function getDiscussions()
{
var q = " +TYPE:\"{http://www.alfresco.org/model/forum/1.0}post\"" +
" +PATH:\"/app:company_home/st:sites/*/cm:discussions/*/*\"" +
" +@cm\\:creator:\"" + person.properties.userName + '"';
// NOTE: pull back all posts as first reply on each post will also find the root post
// the posts will be discarded until the root post for each topic is found.
nodes = search.luceneSearch(q, '@cm:modified', false);
return processResults(nodes, 3);
}
model.data = {};
model.data.blogPosts = getDraftBlogPostList();
model.data.wikiPages = getWikiPages();
model.data.discussions = getDiscussions();

View File

@@ -0,0 +1,59 @@
<#macro dateFormat date>${xmldate(date)}</#macro>
<#macro renderItem item>
<#escape x as jsonUtils.encodeJSONString(x)>
{
"name":"${item.name}",
"nodeRef": "${item.nodeRef}",
"type": "${item.type}",
"displayName": "${item.displayName!''}",
"description": "${item.description!''}",
"createdOn": "<@dateFormat item.createdOn />",
"createdBy": "${item.createdBy!''}",
"createdByUser": "${item.createdByUser!''}",
"modifiedOn": "<@dateFormat item.modifiedOn />",
"modifiedByUser": "${item.modifiedByUser}",
"modifiedBy": "${item.modifiedBy}",
"size": ${item.size?c},
"tags": [<#list item.tags as tag>"${tag}"<#if tag_has_next>,</#if></#list>],
<#if item.site??>
"site":
{
"shortName": "${item.site.shortName}",
"title": "${item.site.title}"
},
"container": "${item.container}"
</#if>
}
</#escape>
</#macro>
<#escape x as jsonUtils.encodeJSONString(x)>
{
"blogPosts":
{
"items":
[
<#list data.blogPosts.items as item>
<@renderItem item /><#if item_has_next>,</#if>
</#list>
]
},
"wikiPages":
{
"items":
[
<#list data.wikiPages.items as item>
<@renderItem item /><#if item_has_next>,</#if>
</#list>
]
},
"forumPosts":
{
"items":
[
<#list data.discussions.items as item>
<@renderItem item /><#if item_has_next>,</#if>
</#list>
]
}
}
</#escape>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>my-tasks</shortname>
<description>My Tasks Dashlet Data Webscript</description>
<url>/slingshot/dashlets/my-tasks?filter={filter?}&amp;date={date?}</url>
<format default="json"></format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,22 @@
var today = new Date();
var tomorrow = new Date();
tomorrow.setDate(today.getDate() + 1);
var lastSunday = new Date();
lastSunday.setDate(today.getDate() - today.getDay());
var sunday = new Date();
sunday.setDate(lastSunday.getDate() + 7);
var nextSunday = new Date();
nextSunday.setDate(sunday.getDate() + 7);
var future = new Date();
future.setYear(9999);
model.tomorrow = tomorrow;
model.lastSunday = lastSunday;
model.sunday = sunday;
model.nextSunday = nextSunday;
model.future = future;

View File

@@ -0,0 +1,223 @@
<#assign workingCopyLabel = " " + message("coci_service.working_copy_label")>
<#assign inviteWorkflowDefinitionNames = ["jbpm$imwf:invitation-moderated", "jbpm$inwf:invitation-nominated"]>
<#assign filter = args["filter"]!"all">
<#--
Resolve site, container and path
-->
<#macro location doc>
<#assign qnamePaths = doc.qnamePath?split("/")>
<#assign displayPaths = doc.displayPath?split("/") + [""]>
<#if ((qnamePaths?size &gt; 5) && (qnamePaths[2] == "st:sites"))>
"site": "${displayPaths[3]}",
"container": "${displayPaths[4]}",
"path": "<#list displayPaths[5..] as path><#if path_has_next>/</#if>${path}</#list>"
</#if>
</#macro>
<#--
Render a task
-->
<#macro dateFormat date>${date?datetime?string("yyyy-MM-dd HH:mm:ss 'GMT'Z '('zzz')'")!""}</#macro>
<#macro taskDetail task>
{
"id": "${task.id}",
"description": "${(task.description!"")?j_string}",
"dueDate": "<#if task.properties["bpm:dueDate"]?exists><@dateFormat task.properties["bpm:dueDate"] /><#else><@dateFormat future /></#if>",
"status": "${task.properties["bpm:status"]}",
"priority": "${task.properties["bpm:priority"]}",
"startDate": "<@dateFormat task.startDate />",
"type": "${task.type}",
"completeness": "${task.properties["bpm:percentComplete"]}",
"resources":
[
<#list task.packageResources as resource>
{
"nodeRef": "${resource.nodeRef}",
"fileName": "${resource.name}",
"displayName": "${resource.name?replace(workingCopyLabel, "")}",
"location":
{
<@location resource />
},
"icon": "${resource.icon16}"
}<#if resource_has_next>,</#if>
</#list>
],
"transitions":
[
<#list task.transitions as transition>
{
"id": "${transition.id!""}",
"label": "${transition.label!""}"
}<#if transition_has_next>,</#if>
</#list>
]
}
</#macro>
<#macro invitationModeratedTaskDetail task>
<#assign theSite = site.getSiteInfo(task.properties["imwf:resourceName"])>
<#assign theUser = people.getPerson(task.properties["imwf:inviteeUserName"])>
{
"id": "${task.id}",
"description": "${(task.description!"")?j_string}",
"dueDate": "<#if task.properties["bpm:dueDate"]?exists><@dateFormat task.properties["bpm:dueDate"] /><#else><@dateFormat future /></#if>",
"status": "${task.properties["bpm:status"]}",
"priority": "${task.properties["bpm:priority"]}",
"startDate": "<@dateFormat task.startDate />",
"type": "${task.type}",
"completeness": "${task.properties["bpm:percentComplete"]}",
"invitation":
{
"type": "moderated",
"site":
{
"id": "${theSite.shortName}",
"title": "${theSite.title!""}",
"description": "${theSite.description!""}"
},
"invitee":
{
"fullName": "${(theUser.properties.firstName!"" + " " + theUser.properties.lastName!"")?trim}",
<#if theUser.assocs["cm:avatar"]??>
"avatarRef": "${theUser.assocs["cm:avatar"][0].nodeRef?string}",
</#if>
"userName": "${theUser.properties.userName}"
},
"inviteeRole": "${task.properties["imwf:inviteeRole"]}"
},
"transitions":
[
<#list task.transitions as transition>
{
"id": "${transition.id!""}",
"label": "${transition.label!""}"
}<#if transition_has_next>,</#if>
</#list>
]
}
</#macro>
<#macro invitationNominatedTaskDetail task>
{
"id": "${task.id}",
"description": "${(task.description!"")?j_string}",
"dueDate": "<#if task.properties["bpm:dueDate"]?exists><@dateFormat task.properties["bpm:dueDate"] /><#else><@dateFormat future /></#if>",
"status": "${task.properties["bpm:status"]}",
"priority": "${task.properties["bpm:priority"]}",
"startDate": "<@dateFormat task.startDate />",
"type": "${task.type}",
"completeness": "${task.properties["bpm:percentComplete"]}",
<#if task.properties["inwf:resourceName"]?exists>
<#assign theInviter = people.getPerson(task.properties["inwf:inviterUserName"])>
"invitation":
{
"type": "nominated",
"site":
{
"id": "${task.properties["inwf:resourceName"]!""}",
"title": "${jsonUtils.encodeJSONString(task.properties["inwf:resourceTitle"]!"")}",
"description": "${jsonUtils.encodeJSONString(task.properties["inwf:resourceDescription"]!"")}"
},
"inviter":
{
"fullName": "${(theInviter.properties.firstName!"" + " " + theInviter.properties.lastName!"")?trim}",
<#if theInviter.assocs["cm:avatar"]??>
"avatarRef": "${theInviter.assocs["cm:avatar"][0].nodeRef?string}",
</#if>
"userName": "${theInviter.properties.userName}"
},
"inviteeRole": "${task.properties["inwf:inviteeRole"]}"
},
</#if>
"transitions":
[
<#list task.transitions as transition>
{
"id": "${transition.id!""}",
"label": "${transition.label!""}"
}<#if transition_has_next>,</#if>
</#list>
]
}
</#macro>
<#--
Filter task list
-->
<#assign filteredTasks = []>
<#assign unfilteredTasks = workflow.assignedTasks + workflow.pooledTasks>
<#list unfilteredTasks as task>
<#assign hasDate = task.properties["bpm:dueDate"]?exists>
<#assign dueDate><#if task.properties["bpm:dueDate"]?exists>${task.properties["bpm:dueDate"]?date!""}<#else>${future?date}</#if></#assign>
<#switch filter>
<#case "all">
<#assign filteredTasks = filteredTasks + [task]>
<#break>
<#case "today">
<#if (dateCompare(date?date, dueDate?date, 0, "==") == 1)>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "tomorrow">
<#if (dateCompare(tomorrow?date, dueDate?date, 0, "==") == 1)>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "this-week">
<#if ((dateCompare(lastSunday?date, dueDate?date) == 0) && (dateCompare(sunday?date, dueDate?date) == 1))>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "next-week">
<#if ((dateCompare(sunday?date, dueDate?date) == 0) && (dateCompare(nextSunday?date, dueDate?date) == 1))>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "overdue">
<#if (dateCompare(date?date, dueDate?date) == 1)>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "no-due-date">
<#if !hasDate>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
<#break>
<#case "invites">
<#if task.properties["bpm:package"]??>
<#if inviteWorkflowDefinitionNames?seq_contains(task.properties["bpm:package"].properties["bpm:workflowDefinitionName"])>
<#assign filteredTasks = filteredTasks + [task]>
</#if>
</#if>
<#break>
</#switch>
</#list>
<#escape x as jsonUtils.encodeJSONString(x)>
{
"tasks":
[
<#list filteredTasks as task>
<#if task.properties["bpm:package"]??>
<#assign packageNode = task.properties["bpm:package"]>
<#if packageNode.properties["bpm:workflowDefinitionName"] == "jbpm$imwf:invitation-moderated">
<@invitationModeratedTaskDetail task />
<#elseif packageNode.properties["bpm:workflowDefinitionName"] == "jbpm$inwf:invitation-nominated">
<@invitationNominatedTaskDetail task />
<#else>
<@taskDetail task />
</#if>
</#if>
<#if task_has_next>,</#if>
</#list>
]
}
</#escape>

View File

@@ -0,0 +1,25 @@
<#macro resultsJSON results>
<#escape x as jsonUtils.encodeJSONString(x)>
{
"totalResults": ${results?size?c},
"overallSuccess": ${overallSuccess?string},
"successCount": ${successCount?c},
"failureCount": ${failureCount?c},
"results":
[
<#list results as r>
{
<#list r?keys as key>
<#assign value = r[key]>
<#if value?is_number || value?is_boolean>
"${key}": ${value?string}<#if key_has_next>,</#if>
<#else>
"${key}": "${value}"<#if key_has_next>,</#if>
</#if>
</#list>
}<#if r_has_next>,</#if>
</#list>
]
}
</#escape>
</#macro>

View File

@@ -0,0 +1,158 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js">
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Data List Component: action
*
* For a single-asset action, template paramters address the item.
* For multi-item actions, optional template parameters address the source or destination node,
* and a JSON body addresses the items involved in the action.
*
* @param uri {string} node/{store_type}/{store_id}/{id}
*/
/**
* Main script entry point
* @method main
*/
function main()
{
var nodeRef = null,
rootNode = null,
params = {};
if (url.templateArgs.store_type !== null)
{
/**
* nodeRef input: store_type, store_id and id
*/
var storeType = url.templateArgs.store_type,
storeId = url.templateArgs.store_id,
id = url.templateArgs.id;
nodeRef = storeType + "://" + storeId + "/" + id;
rootNode = ParseArgs.resolveNode(nodeRef);
if (rootNode == null)
{
rootNode = search.findNode(nodeRef);
if (rootNode === null)
{
status.setCode(status.STATUS_NOT_FOUND, "Not a valid nodeRef: '" + nodeRef + "'");
return null;
}
}
params.nodeRef = nodeRef;
params.rootNode = rootNode;
}
// Multiple input files in the JSON body?
var items = getMultipleInputValues("nodeRefs");
if (typeof items != "string")
{
params.items = items;
}
// Check runAction function is provided the action's webscript
if (typeof runAction != "function")
{
status.setCode(status.STATUS_BAD_REQUEST, "Action webscript must provide runAction() function.");
return;
}
// Actually run the action
var results = runAction(params);
if (results)
{
if (typeof results == "string")
{
status.setCode(status.STATUS_INTERNAL_SERVER_ERROR, results);
}
else if (typeof results.status == "object")
{
// Status fields have been manually set
status.redirect = true;
for (var s in results.status)
{
status[s] = results.status[s];
}
}
else
{
/**
* NOTE: Webscripts run within one transaction only.
* If a single operation fails, the transaction is marked for rollback and all
* previous (successful) operations are also therefore rolled back.
* We therefore need to scan the results for a failed operation and mark the entire
* set of operations as failed.
*/
var overallSuccess = true,
successCount = 0,
failureCount = 0;
for (var i = 0, j = results.length; i < j; i++)
{
overallSuccess = overallSuccess && results[i].success;
results[i].success ? ++successCount : ++failureCount;
}
model.overallSuccess = overallSuccess;
model.successCount = successCount;
model.failureCount = failureCount;
model.results = results;
}
}
}
/**
* Get multiple input values
*
* @method getMultipleInputValues
* @return {array|string} Array containing multiple values, or string error
*/
function getMultipleInputValues(param)
{
var values = [],
error = null;
try
{
// Was a JSON parameter list supplied?
if (typeof json != "undefined")
{
if (!json.isNull(param))
{
var jsonValues = json.get(param);
// Convert from JSONArray to JavaScript array
for (var i = 0, j = jsonValues.length(); i < j; i++)
{
values.push(jsonValues.get(i));
}
}
}
}
catch(e)
{
error = e.toString();
}
// Return the values array, or the error string if it was set
return (error !== null ? error : values);
}

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>duplicate</shortname>
<description>Data List Action - Duplicate single or multiple items</description>
<url>/slingshot/datalists/action/duplicate/node/{store_type}/{store_id}/{id}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,2 @@
<#import "action.lib.ftl" as actionLib />
<@actionLib.resultsJSON results=results />

View File

@@ -0,0 +1,124 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/action/action.lib.js">
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Duplicate multiple items action
* @method POST
*/
/**
* Entrypoint required by action.lib.js
*
* @method runAction
* @param p_params {object} Object literal containing items array
* @return {object|null} object representation of action results
*/
function runAction(p_params)
{
var results = [],
parentNode = p_params.rootNode,
items = p_params.items,
index, itemNode, result, nodeRef;
// Must have parent node and array of items
if (!parentNode)
{
status.setCode(status.STATUS_BAD_REQUEST, "No parent node supplied on URL.");
return;
}
if (!items || items.length === 0)
{
status.setCode(status.STATUS_BAD_REQUEST, "No items supplied in JSON body.");
return;
}
// Properties to skip when duplicating
var propertiesToSkip =
{
"cm:name": true,
"cm:content": true,
"cm:created": true,
"cm:creator": true,
"cm:modified": true,
"cm:modifier": true
};
for (index in items)
{
nodeRef = items[index];
result =
{
nodeRef: nodeRef,
action: "duplicateItem",
success: false
};
try
{
itemNode = search.findNode(nodeRef);
if (itemNode !== null)
{
var duplicateProperties = new Array(),
propNames = itemNode.getPropertyNames(true),
propName;
// Copy selected properties from the original node
for (var i = 0, ii = propNames.length; i < ii; i++)
{
propName = propNames[i];
if (propName in propertiesToSkip || propName.indexOf("sys:") == 0)
{
continue;
}
duplicateProperties[propName] = itemNode.properties[propName];
}
// Duplicate the node with a new GUID cm:name
var newNode = parentNode.createNode(null, itemNode.type, duplicateProperties);
if (newNode !== null)
{
// Now copy any associations
for (var idxAssoc in itemNode.assocs)
{
var assocs = itemNode.assocs[idxAssoc];
for (var j = 0, jj = assocs.length; j < jj; j++)
{
newNode.createAssociation(assocs[j], idxAssoc);
}
}
result.nodeRef = newNode.nodeRef.toString();
result.success = true;
}
}
}
catch (e)
{
result.success = false;
}
results.push(result);
}
return results;
}
/* Bootstrap action script */
main();

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>files</shortname>
<description>Data List Action - Delete single or multiple items</description>
<url>/slingshot/datalists/action/items</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,2 @@
<#import "action.lib.ftl" as actionLib />
<@actionLib.resultsJSON results=results />

View File

@@ -0,0 +1,77 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/action/action.lib.js">
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Delete multiple items action
* @method DELETE
*/
/**
* Entrypoint required by action.lib.js
*
* @method runAction
* @param p_params {object} Object literal containing items array
* @return {object|null} object representation of action results
*/
function runAction(p_params)
{
var results = [],
items = p_params.items,
item, result, nodeRef;
// Must have array of items
if (!items || items.length == 0)
{
status.setCode(status.STATUS_BAD_REQUEST, "No items supplied in JSON body.");
return;
}
for (item in items)
{
nodeRef = items[item];
result =
{
nodeRef: nodeRef,
action: "deleteItem",
success: false
}
try
{
itemNode = search.findNode(nodeRef);
if (itemNode != null)
{
result.success = itemNode.remove();
}
}
catch (e)
{
result.success = false;
}
results.push(result);
}
return results;
}
/* Bootstrap action script */
main();

View File

@@ -0,0 +1,10 @@
<webscript>
<shortname>DataLists - Data retrieval</shortname>
<description>Data Lists Component - retrieve data within a given list</description>
<url>/slingshot/datalists/data/site/{site}/{container}/{list}</url>
<url>/slingshot/datalists/data/node/{store_type}/{store_id}/{id}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction allow="readwrite" buffersize="0">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,36 @@
<#import "item.lib.ftl" as itemLib />
<#escape x as jsonUtils.encodeJSONString(x)>
{
"totalRecords": ${data.paging.totalRecords?c},
"startIndex": ${data.paging.startIndex?c},
"metadata":
{
"parent":
{
<#if data.parent??>
<#assign parentNode = data.parent.node>
"nodeRef": "${parentNode.nodeRef}",
"permissions":
{
"userAccess":
{
<#list data.parent.userAccess?keys as perm>
<#if data.parent.userAccess[perm]?is_boolean>
"${perm?string}": ${data.parent.userAccess[perm]?string}<#if perm_has_next>,</#if>
</#if>
</#list>
}
}
</#if>
}
},
"items":
[
<#list data.items as item>
{
<@itemLib.itemJSON item />
}<#if item_has_next>,</#if>
</#list>
]
}
</#escape>

View File

@@ -0,0 +1,125 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/evaluator.lib.js">
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/filters.lib.js">
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js">
const REQUEST_MAX = 1000;
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Main entry point: Return data list with properties being supplied in POSTed arguments
*
* @method getData
*/
function getData()
{
// Use helper function to get the arguments
var parsedArgs = ParseArgs.getParsedArgs();
if (parsedArgs === null)
{
return;
}
var fields = null;
// Extract fields (if given)
if (json.has("fields"))
{
// Convert the JSONArray object into a native JavaScript array
fields = [];
var jsonFields = json.get("fields"),
numFields = jsonFields.length();
for (count = 0; count < numFields; count++)
{
fields.push(jsonFields.get(count).replaceFirst("_", ":"));
}
}
// Try to find a filter query based on the passed-in arguments
var filter = parsedArgs.filter,
allNodes = [], node,
items = [];
if (filter == null || filter.filterId == "all")
{
// Use non-query method
var parentNode = parsedArgs.listNode;
if (parentNode != null)
{
var pagedResult = parentNode.childFileFolders(true, false, Filters.IGNORED_TYPES.concat(Filters.IGNORED_ASPECTS), -1, -1, REQUEST_MAX, "cm:name", true, null);
allNodes = pagedResult.page;
}
}
else
{
var filterParams = Filters.getFilterParams(filter, parsedArgs)
query = filterParams.query;
// Query the nodes - passing in default sort and result limit parameters
if (query !== "")
{
allNodes = search.query(
{
query: query,
language: filterParams.language,
page:
{
maxItems: (filterParams.limitResults ? parseInt(filterParams.limitResults, 10) : 0)
},
sort: filterParams.sort,
templates: filterParams.templates,
namespace: (filterParams.namespace ? filterParams.namespace : null)
});
}
}
if (allNodes.length > 0)
{
for each (node in allNodes)
{
try
{
items.push(Evaluator.run(node, fields));
}
catch(e) {}
}
}
return (
{
fields: fields,
paging:
{
totalRecords: items.length,
startIndex: 0
},
parent:
{
node: parsedArgs.listNode,
userAccess:
{
create: parsedArgs.listNode.hasPermission("CreateChildren")
}
},
items: items
});
}
model.data = getData();

View File

@@ -0,0 +1,285 @@
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
var Evaluator =
{
/**
* Cache for cm:person objects
*/
PeopleObjectCache: {},
/**
* Gets / caches a person object
*
* @method getPersonObject
* @param nodeRef {string} NodeRef of a cm:person object
*/
getPersonObject: function Evaluator_getPersonObject(nodeRef)
{
if (nodeRef == null || nodeRef == "")
{
return null;
}
if (typeof Evaluator.PeopleObjectCache[nodeRef] == "undefined")
{
var person = search.findNode(nodeRef);
Evaluator.PeopleObjectCache[nodeRef] =
{
userName: person.properties.userName,
firstName: person.properties.firstName,
lastName: person.properties.lastName,
displayName: (person.properties.firstName + " " + person.properties.lastName).replace(/^\s+|\s+$/g, "")
};
if (person.assocs["cm:avatar"] != null)
{
Evaluator.PeopleObjectCache[nodeRef].avatar = person.assocs["cm:avatar"][0];
}
}
return Evaluator.PeopleObjectCache[nodeRef];
},
/**
* Cache for nodes that are subtypes of cm:cmobject
*/
ContentObjectCache: {},
/**
* Gets / caches a content object
*
* @method getContentObject
* @param nodeRef {string} NodeRef
*/
getContentObject: function Evaluator_getContentObject(nodeRef)
{
if (nodeRef == null || nodeRef == "")
{
return null;
}
if (typeof Evaluator.ContentObjectCache[nodeRef] == "undefined")
{
var node = search.findNode(nodeRef);
try
{
Evaluator.ContentObjectCache[nodeRef] = node;
}
catch(e)
{
// Possibly a stale indexed node
return null;
}
}
return Evaluator.ContentObjectCache[nodeRef];
},
/**
* Generate displayValue and any extra metadata for this field
*
* @method decorateFieldData
* @param objData {object} Object literal containing this field's data
* @param node {ScriptNode} The list item node for this field
* @return {Boolean} false to prevent this field being added to the output stream.
*/
decorateFieldData: function Evaluator_decorateFieldData(objData, node)
{
var value = objData.value,
type = objData.type,
obj;
if (type == "cm:person")
{
obj = Evaluator.getPersonObject(value);
if (obj == null)
{
return false;
}
objData.displayValue = obj.displayName;
objData.metadata = obj.userName;
}
else if (type == "cm:folder")
{
obj = Evaluator.getContentObject(value);
if (obj == null)
{
return false;
}
objData.displayValue = obj.displayPath.substring(companyhome.name.length() + 1);
objData.metadata = "container";
}
else if (type == "category")
{
var displayValue = "",
categoryNodeRefs = value.split(",");
for each (nodeRef in categoryNodeRefs)
{
if (displayValue !== "")
{
displayValue += ", "
}
displayValue += Evaluator.getContentObject(nodeRef).properties["cm:name"];
}
objData.displayValue = displayValue;
}
else if (type.indexOf(":") > 0 && node.isSubType("cm:cmobject"))
{
obj = Evaluator.getContentObject(value);
if (obj == null || !obj.hasPermission("Read"))
{
return false;
}
objData.displayValue = obj.properties["cm:name"];
objData.metadata = obj.isContainer ? "container" : "document";
}
return true;
},
/**
* Translates a List fieldDefinition
*
* @method translateField
* @param objDef {FieldDefinition} objDef
* @param value {String} default value
*/
translateField: function Evaluator_translateField(objDef, value)
{
if (objDef == null || objDef == "")
{
return null;
}
if (objDef.constraints != null)
{
for ( var i=0, len= objDef.constraints.size(); i<len; ++i )
{
if ("LIST" == objDef.constraints.get(i).type)
{
var allowedV = objDef.constraints.get(i).parameters.allowedValues;
for (var j=0; j<allowedV.size(); ++j )
{
var allowedVasString = "" + allowedV.get(j);
var allValSplit = allowedVasString.split("|");
if (value == allValSplit[0]) {
return allValSplit[1];
}
}
}
}
}
return value;
},
/**
* Node Evaluator - main entrypoint
*/
run: function Evaluator_run(node, fields)
{
var permissions = {},
actionSet = "",
actionLabels = {},
createdBy = Common.getPerson(node.properties["cm:creator"]),
modifiedBy = Common.getPerson(node.properties["cm:modifier"]),
nodeData = {};
/**
* PERMISSIONS
*/
permissions =
{
"create": node.hasPermission("CreateChildren"),
"edit": node.hasPermission("Write"),
"delete": node.hasPermission("Delete")
};
// Use the form service to parse the required properties
scriptObj = formService.getForm("node", node.nodeRef, fields, fields);
// Make sure we can quickly look-up the Field Definition within the formData loop...
var objDefinitions = {};
for each (formDef in scriptObj.fieldDefinitions)
{
objDefinitions[formDef.dataKeyName] = formDef;
}
// Populate the data model
var formData = scriptObj.formData.data;
for (var k in formData)
{
var isAssoc = k.indexOf("assoc") == 0,
value = formData[k].value,
values,
type = isAssoc ? objDefinitions[k].endpointType : objDefinitions[k].dataType,
endpointMany = isAssoc ? objDefinitions[k].endpointMany : false,
objData =
{
type: type
};
if (value instanceof java.util.Date)
{
objData.value = utils.toISO8601(value);
objData.displayValue = objData.value;
nodeData[k] = objData;
}
else if (endpointMany)
{
if (value.length() > 0)
{
values = value.split(",");
nodeData[k] = [];
for each (value in values)
{
var objLoop =
{
type: objData.type,
value: value,
displayValue: value
};
if (Evaluator.decorateFieldData(objLoop, node))
{
nodeData[k].push(objLoop);
}
}
}
}
else
{
objData.value = value;
objData.displayValue = isAssoc ? value : Evaluator.translateField(objDefinitions[k],value);
if (Evaluator.decorateFieldData(objData, node))
{
nodeData[k] = objData;
}
}
}
return(
{
node: node,
nodeData: nodeData,
actionSet: actionSet,
actionPermissions: permissions,
createdBy: createdBy,
modifiedBy: modifiedBy,
tags: node.tags,
actionLabels: actionLabels
});
}
};

View File

@@ -0,0 +1,169 @@
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
var Filters =
{
/**
* Types that we want to suppress from the resultset
*/
IGNORED_TYPES:
[
"cm:systemfolder",
"fm:forums",
"fm:forum",
"fm:topic",
"fm:post"
],
/**
* Aspects that we want to suppress from the resultset
*/
IGNORED_ASPECTS:
[
"cm:workingcopy"
],
/**
* Create filter parameters based on input parameters
*
* @method getFilterParams
* @param filter {string} Required filter
* @param parsedArgs {object} Parsed arguments object literal
* @return {object} Object literal containing parameters to be used in Lucene search
*/
getFilterParams: function Filter_getFilterParams(filter, parsedArgs)
{
var filterParams =
{
query: "+PARENT:\"" + parsedArgs.nodeRef + "\" ",
limitResults: null,
sort: [
{
column: "@cm:name",
ascending: true
}],
language: "lucene",
templates: null
};
// Max returned results specified?
var argMax = args.max;
if ((argMax !== null) && !isNaN(argMax))
{
filterParams.limitResults = argMax;
}
// Create query based on passed-in arguments
var filterData = String(filter.filterData || ""),
filterQuery = filterParams.query;
// Common types and aspects to filter from the UI
var filterQueryDefaults = ' -TYPE:"' + Filters.IGNORED_TYPES.join('" -TYPE:"') + '"' + ' -ASPECT:"' + Filters.IGNORED_ASPECTS.join('" -ASPECT:"') + '"';
switch (String(filter.filterId))
{
case "recentlyAdded":
case "recentlyModified":
case "recentlyCreatedByMe":
case "recentlyModifiedByMe":
var onlySelf = (filter.filterId.indexOf("ByMe")) > 0 ? true : false,
dateField = (filter.filterId.indexOf("Modified") > 0) ? "modified" : "created",
ownerField = (dateField == "created") ? "creator" : "modifier";
// Default to 7 days - can be overridden using "days" argument
var dayCount = 7,
argDays = args.days;
if ((argDays !== null) && !isNaN(argDays))
{
dayCount = argDays;
}
// Default limit to 50 documents - can be overridden using "max" argument
if (filterParams.limitResults === null)
{
filterParams.limitResults = 50;
}
var date = new Date();
var toQuery = date.getFullYear() + "\\-" + (date.getMonth() + 1) + "\\-" + date.getDate();
date.setDate(date.getDate() - dayCount);
var fromQuery = date.getFullYear() + "\\-" + (date.getMonth() + 1) + "\\-" + date.getDate();
filterQuery = "+PARENT:\"" + parsedArgs.nodeRef;
if (parsedArgs.nodeRef == "alfresco://sites/home")
{
// Special case for "Sites home" pseudo-nodeRef
filterQuery += "/*/cm:dataLists";
}
filterQuery += "\"";
filterQuery += " +@cm\\:" + dateField + ":[" + fromQuery + "T00\\:00\\:00.000 TO " + toQuery + "T23\\:59\\:59.999]";
if (onlySelf)
{
filterQuery += " +@cm\\:" + ownerField + ":\"" + person.properties.userName + '"';
}
filterQuery += " -TYPE:\"folder\"";
filterParams.sort = [
{
column: "@cm:" + dateField,
ascending: false
}];
filterParams.query = filterQuery + filterQueryDefaults;
break;
case "createdByMe":
// Default limit to 50 documents - can be overridden using "max" argument
if (filterParams.limitResults === null)
{
filterParams.limitResults = 50;
}
filterQuery = "+PARENT:\"" + parsedArgs.nodeRef;
if (parsedArgs.nodeRef == "alfresco://sites/home")
{
// Special case for "Sites home" pseudo-nodeRef
filterQuery += "/*/cm:dataLists";
}
filterQuery += "\"";
filterQuery += " +@cm\\:creator:\"" + person.properties.userName + '"';
filterQuery += " -TYPE:\"folder\"";
filterParams.query = filterQuery + filterQueryDefaults;
break;
case "node":
filterParams.query = "+ID:\"" + parsedArgs.nodeRef + "\"";
break;
case "tag":
// Remove any trailing "/" character
if (filterData.charAt(filterData.length - 1) == "/")
{
filterData = filterData.slice(0, -1);
}
filterParams.query += "+PATH:\"/cm:taggable/cm:" + search.ISO9075Encode(filterData) + "/member\"";
break;
default:
filterParams.query = filterQuery + filterQueryDefaults;
break;
}
return filterParams;
}
};

View File

@@ -0,0 +1,81 @@
<#macro itemJSON item>
<#escape x as jsonUtils.encodeJSONString(x)>
<#assign node = item.node>
<#assign tags><#list item.tags as tag>"${tag}"<#if tag_has_next>,</#if></#list></#assign>
"nodeRef": "${node.nodeRef}",
"createdOn": "${xmldate(node.properties.created)}",
"createdBy":
{
"value": "${item.createdBy.userName}",
"displayValue": "${item.createdBy.displayName}"
},
"modifiedOn": "${xmldate(node.properties.modified)}",
"modifiedBy":
{
"value": "${item.modifiedBy.userName}",
"displayValue": "${item.modifiedBy.displayName}"
},
"actionSet": "${item.actionSet}",
"tags": <#noescape>[${tags}]</#noescape>,
"permissions":
{
"userAccess":
{
<#list item.actionPermissions?keys as actionPerm>
<#if item.actionPermissions[actionPerm]?is_boolean>
"${actionPerm?string}": ${item.actionPermissions[actionPerm]?string}<#if actionPerm_has_next>,</#if>
</#if>
</#list>
}
},
<#if item.custom??>"custom": <#noescape>${item.custom}</#noescape>,</#if>
"actionLabels":
{
<#if item.actionLabels??>
<#list item.actionLabels?keys as actionLabel>
"${actionLabel?string}": "${item.actionLabels[actionLabel]}"<#if actionLabel_has_next>,</#if>
</#list>
</#if>
},
"itemData":
{
<#list item.nodeData?keys as key>
<#assign itemData = item.nodeData[key]>
"${key}":
<#if itemData?is_sequence>
[
<#list itemData as data>
<@renderData data /><#if data_has_next>,</#if>
</#list>
]
<#else>
<@renderData itemData />
</#if><#if key_has_next>,</#if>
</#list>
}
</#escape>
</#macro>
<#macro renderData data>
<#escape x as jsonUtils.encodeJSONString(x)>
{
<#if data.value?is_boolean>
"value": ${data.value?string},
<#elseif data.value?is_number>
"value": ${data.value?c},
<#else>
"value": "${data.value}",
</#if>
<#if data.metadata??>
"metadata": "${data.metadata}",
</#if>
<#if data.displayValue?is_boolean>
"displayValue": ${data.displayValue?string}
<#elseif data.displayValue?is_number>
"displayValue": ${data.displayValue?c}
<#else>
"displayValue": "${data.displayValue}"
</#if>
}
</#escape>
</#macro>

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>DataLists - Single item data retrieval</shortname>
<description>Data Lists Component - retrieve data for a single item by nodeRef</description>
<url>/slingshot/datalists/item/node/{store_type}/{store_id}/{id}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,30 @@
<#import "item.lib.ftl" as itemLib />
<#escape x as jsonUtils.encodeJSONString(x)>
{
"metadata":
{
"parent":
{
<#if data.parent??>
<#assign parentNode = data.parent.node>
"nodeRef": "${parentNode.nodeRef}",
"permissions":
{
"userAccess":
{
<#list data.parent.userAccess?keys as perm>
<#if data.parent.userAccess[perm]?is_boolean>
"${perm?string}": ${data.parent.userAccess[perm]?string}<#if perm_has_next>,</#if>
</#if>
</#list>
}
}
</#if>
}
},
"item":
{
<@itemLib.itemJSON data.item />
}
}
</#escape>

View File

@@ -0,0 +1,80 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/evaluator.lib.js">
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js">
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Main entry point: Return data list with properties being supplied in POSTed arguments
*
* @method getData
*/
function getData()
{
// Use helper function to get the arguments
var parsedArgs = ParseArgs.getParsedArgs();
if (parsedArgs === null)
{
return;
}
var fields = null;
// Extract fields (if given)
if (json.has("fields"))
{
// Convert the JSONArray object into a native JavaScript array
fields = [];
var jsonFields = json.get("fields"),
numFields = jsonFields.length();
for (count = 0; count < numFields; count++)
{
fields.push(jsonFields.get(count).replaceFirst("_", ":"));
}
}
// Try to find a filter query based on the passed-in arguments
var node = search.findNode(parsedArgs.nodeRef),
items = [];
if (node != null)
{
try
{
item = Evaluator.run(node, fields);
}
catch(e) {}
}
return (
{
fields: fields,
parent:
{
node: parsedArgs.listNode,
userAccess:
{
create: parsedArgs.listNode.hasPermission("CreateChildren")
}
},
item: item
});
}
model.data = getData();

View File

@@ -0,0 +1,9 @@
<webscript>
<shortname>DataLists - Delete a Data List</shortname>
<description>Data Lists Component - delete a Data List</description>
<url>/slingshot/datalists/list/node/{store_type}/{store_id}/{id}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction allow="readwrite">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1,51 @@
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js">
/**
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Main entry point: Delete a Data List
*
* @method deleteList
*/
function deleteList()
{
// Use helper function to get the arguments
var parsedArgs = ParseArgs.getParsedArgs();
if (parsedArgs === null)
{
return;
}
try
{
if (!parsedArgs.rootNode.remove())
{
status.setCode(status.STATUS_INTERNAL_SERVER_ERROR, "Could not delete.");
return;
}
}
catch(e)
{
status.setCode(status.STATUS_INTERNAL_SERVER_ERROR, e.toString());
return;
}
}
deleteList();

View File

@@ -0,0 +1,11 @@
<webscript>
<shortname>DataLists - Download a Data List</shortname>
<description>Data Lists Component - Download a Data List</description>
<url>/slingshot/datalists/list/site/{site}/{container}/{list}/</url>
<url>/slingshot/datalists/list/site/{site}/{container}/{list}</url>
<url>/slingshot/datalists/list/node/{store_type}/{store_id}/{id}</url>
<format default="xls">argument</format>
<authentication>user</authentication>
<transaction allow="readonly">required</transaction>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -0,0 +1 @@
<#-- Must not have a newline or any other contents! -->${writeExcel.write()}

View File

@@ -0,0 +1 @@
<#-- Must not have a newline or any other contents! -->${writeExcel.write()}

Some files were not shown because too many files have changed in this diff Show More