diff --git a/content-services/latest/admin/auth-sync.md b/content-services/latest/admin/auth-sync.md index 31d5ca5de3..b4b7a89938 100644 --- a/content-services/latest/admin/auth-sync.md +++ b/content-services/latest/admin/auth-sync.md @@ -912,7 +912,7 @@ Active Directory is not used for LDAP authentication; it is used for Kerberos au #### Enable Kerberos authentication -Use this information to enable and configure Kerberos authentication in Content Services 6.2. +Use this information to enable and configure Kerberos authentication. > **Note:** These instructions assume that you want to use SSO Kerberos. diff --git a/content-services/latest/admin/cluster.md b/content-services/latest/admin/cluster.md index 2197c4d6c7..97acf323b7 100644 --- a/content-services/latest/admin/cluster.md +++ b/content-services/latest/admin/cluster.md @@ -8,18 +8,18 @@ A cluster represents a collection of nodes. Clustering is implemented to provide ## Prerequisites for upgrades -There are a number of prerequisites for upgrading from a version of Content Services prior to 4.2 to 6.2 in a clustered environment. +There are a number of prerequisites for upgrading from a version of Content Services prior to 4.2 in a clustered environment. -Before upgrading, ensure that all files and configuration are backed up. Any customization(s) that you've made, for example, creation of custom caches, might need to be reapplied using the new Content Services 6.2 clustering infrastructure. +Before upgrading, ensure that all files and configuration are backed up. Any customization(s) that you've made, for example, creation of custom caches, might need to be reapplied using the new Content Services clustering infrastructure. The following libraries are no longer used in Content Services 4.2 onwards, so any configuration related to these libraries should be removed before upgrading: * JGroups * EHCache -> **Note:** You do not need to follow these steps if you're upgrading from Content Services 4.2 to Content Services 6.2. This information is only relevant if you're upgrading from any version prior to 4.2. +> **Note:** You do not need to follow these steps if you're upgrading from Content Services 4.2. This information is only relevant if you're upgrading from any version prior to 4.2. -Follow the steps to remove the configuration not supported in version 6.2: +Follow the steps to remove the configuration not supported in version 7.0: 1. Browse to the `` directory. @@ -58,7 +58,7 @@ Follow the steps to remove the configuration not supported in version 6.2: The `filesystem.cluster.configFile` property mentioned in Step 5 refers to the `hazelcastConfig.xml` file. -8. After you've performed all the specified steps, if you want to initiate clustering, see [Setting up repository server cluster](#setuprepocluster) for the instructions on installing a Content Services 6.2 cluster. +8. After you've performed all the specified steps, if you want to initiate clustering, see [Setting up repository server cluster](#setuprepocluster). ## Components of a Content Services solution @@ -554,7 +554,7 @@ Use this information to track clustering issues. ``` This controls clustering initialization and shutdown. It provides `INFO` level startup and shutdown messages. - It also provides `WARN` level messages, if clustering is disabled or an invalid 6.2 license is installed. + It also provides `WARN` level messages, if clustering is disabled or an invalid license is installed. Here is an example output: diff --git a/content-services/latest/admin/db-cleanup.md b/content-services/latest/admin/db-cleanup.md index 993a3ecb20..f4623bc7bf 100644 --- a/content-services/latest/admin/db-cleanup.md +++ b/content-services/latest/admin/db-cleanup.md @@ -52,7 +52,7 @@ system.delete_not_exists.read_only=false system.delete_not_exists.timeout_seconds=-1 ``` -If you're running an earlier version tha Content Services 6.2.1, then follow the steps in the remainder of this page to use the V2 algorithm. +If you're running an earlier version than Content Services 6.2.1, then follow the steps in the remainder of this page to use the V2 algorithm. ### Run new job in read-only mode @@ -129,7 +129,7 @@ If you're running an earlier version tha Content Services 6.2.1, then follow the 3. Set the prop cleaner timeout: ```text - # This will stop the next batch from being processed if the elapsed time from + # This will stop the next batch from being processed if the elapsed time from the job start is greater than 1 hour system.delete_not_exists.timeout_seconds=3600 ``` diff --git a/content-services/latest/admin/import-transfer.md b/content-services/latest/admin/import-transfer.md index b9bd1e407e..690b8097d9 100644 --- a/content-services/latest/admin/import-transfer.md +++ b/content-services/latest/admin/import-transfer.md @@ -316,7 +316,7 @@ The File System Transfer Receiver is delivered as a compressed zip file. 1. Download the following file from the Alfresco Support Portal: - `alfresco-file-transfer-receiver-6.2.1.zip` + `alfresco-file-transfer-receiver-7.0.x.zip` 2. Extract the zip file into a relevant directory. @@ -359,7 +359,7 @@ Use this information to start the File System Transfer Receiver. 1. Ensure that you've expanded the File System Transfer Receiver zip file: - `alfresco-file-transfer-receiver-6.2.1.zip` + `alfresco-file-transfer-receiver-7.0.x.zip` 2. To run the File System Transfer Receiver, enter the following command: diff --git a/content-services/latest/admin/security.md b/content-services/latest/admin/security.md index 2b81dbfd92..78c3d97ff7 100644 --- a/content-services/latest/admin/security.md +++ b/content-services/latest/admin/security.md @@ -33,7 +33,7 @@ A check that a user has Read permission for a node is done in two stages. First, ## Mitigate brute force attack on user passwords {#mitigatebruteforceattackpwd} -Content Services 6.2 provides basic out-of-the-box protection against brute force attacks on password logins. +Content Services provides basic out-of-the-box protection against brute force attacks on password logins. To mitigate brute force attacks on user passwords, after a few failed login attempts for any given user id, the user id is locked out and marked as `protected`. The user id stays in the `protected` mode for a six seconds protection period. During this time, even if the correct login details are specified, the user can't login. After the six seconds protection period is over, the user can login with the correct login details. @@ -68,48 +68,48 @@ This section brings you up-to-speed on Alfresco keystores and truststores. In Alfresco both the keystore and truststore file types are Java Keystores stored in one of the formats JKS, JCEKS, or PKCS12. We use a keystore and a truststore when Alfresco needs to communicate over SSL/TLS. -Usually, these are password-protected files that sit on the same file system as a running Alfresco instance. +Usually, these are password-protected files that sit on the same file system as a running Alfresco instance. The default format used for these files is JKS until Java 8. -Since Java 9, though, the default keystore format is PKCS12. The biggest difference between JKS and PKCS12 is that JKS -is a format specific to Java, while PKCS12 is a standardized and language-neutral way of storing encrypted private keys +Since Java 9, though, the default keystore format is PKCS12. The biggest difference between JKS and PKCS12 is that JKS +is a format specific to Java, while PKCS12 is a standardized and language-neutral way of storing encrypted private keys and certificates. #### Java KeyStore -A Java keystore stores private key entries, certificates with public keys or just secret keys that we may use for +A Java keystore stores private key entries, certificates with public keys or just secret keys that we may use for various cryptographic purposes. It stores each by an alias for ease of lookup. -Generally speaking, keystores hold keys that Alfresco owns, or you as a customer owns, that we can use to prove the +Generally speaking, keystores hold keys that Alfresco owns, or you as a customer owns, that we can use to prove the integrity of a message and the authenticity of the sender, say by signing payloads. -Usually, we'll use a keystore when we are a server and want to use HTTPS, such as the Repository (i.e. `alfresco.war`). -During an SSL handshake, the server looks up the private key from the keystore and presents its corresponding public key +Usually, we'll use a keystore when we are a server and want to use HTTPS, such as the Repository (i.e. `alfresco.war`). +During an SSL handshake, the server looks up the private key from the keystore and presents its corresponding public key and certificate to the client. -Correspondingly, if the client also needs to authenticate itself (a situation called mutual authentication), such as with Solr, +Correspondingly, if the client also needs to authenticate itself (a situation called mutual authentication), such as with Solr, then the client also has a keystore and also presents its public key and certificate. -There's no default keystore, so if we want to use an encrypted channel, we'll have to set `javax.net.ssl.keyStore` and -`javax.net.ssl.keyStorePassword`. If our keystore format is different than the default, we could use `javax.net.ssl.keyStoreType` +There's no default keystore, so if we want to use an encrypted channel, we'll have to set `javax.net.ssl.keyStore` and +`javax.net.ssl.keyStorePassword`. If our keystore format is different than the default, we could use `javax.net.ssl.keyStoreType` to customize it. -Of course, we can use these keys to service other needs as well. Private keys can sign or decrypt data, and public keys -can verify or encrypt data (i.e. node property/metadata encryption). Secret keys can perform these functions as well. +Of course, we can use these keys to service other needs as well. Private keys can sign or decrypt data, and public keys +can verify or encrypt data (i.e. node property/metadata encryption). Secret keys can perform these functions as well. A keystore is a place that we can hold onto these keys. We can also interact with the keystore programmatically. #### Java TrustStore -A truststore is the opposite, while a keystore typically holds onto certificates that identify us (i.e the Alfresco Repository server), +A truststore is the opposite, while a keystore typically holds onto certificates that identify us (i.e the Alfresco Repository server), a truststore holds onto certificates that identify others (such as the Alfresco Solr client). In Java, we use it to trust the third party we're about to communicate with (i.e. Solr). -If the Solr client talks to the Repository server over HTTPS, the Repository server will look up the associated key from +If the Solr client talks to the Repository server over HTTPS, the Repository server will look up the associated key from its keystore and present the public key and certificate to the Solr client. -We, the Solr client, then look up the associated certificate in our truststore. If the certificate or -Certificate Authorities (CA) presented by the external server is not in our truststore, we'll get an `SSLHandshakeException` +We, the Solr client, then look up the associated certificate in our truststore. If the certificate or +Certificate Authorities (CA) presented by the external server is not in our truststore, we'll get an `SSLHandshakeException` and the connection won't be set up successfully. Java has bundled a truststore called `cacerts` and it resides in the `$JAVA_HOME/lib/security` directory. @@ -119,7 +119,7 @@ It contains default, trusted Certificate Authorities (CA): ```bash $ keytool -list -keystore $JAVA_HOME/lib/security/cacerts Warning: use -cacerts option to access cacerts keystore -Enter keystore password: +Enter keystore password: ***************** WARNING WARNING WARNING ***************** * The integrity of the information stored in your keystore * @@ -132,12 +132,12 @@ Keystore provider: SUN Your keystore contains 93 entries -verisignclass2g2ca [jdk], 13 Jun 2018, trustedCertEntry, +verisignclass2g2ca [jdk], 13 Jun 2018, trustedCertEntry, Certificate fingerprint (SHA-256): 3A:43:E2:20:FE:7F:3E:A9:65:3D:1E:21:74:2E:AC:2B:75:C2:0F:D8:98:03:05:BC:50:2C:AF:8C:2D:9B:41:A1 ... ``` -Here, we can override the default truststore location via the `javax.net.ssl.trustStore` property. Similarly, we can set +Here, we can override the default truststore location via the `javax.net.ssl.trustStore` property. Similarly, we can set `javax.net.ssl.trustStorePassword` and `javax.net.ssl.trustStoreType` to specify the truststore's password and type. #### Creating Java Keystores and Certificates @@ -145,7 +145,7 @@ This is done from command line with the `keytool`, which provides the ability to different types, including private and public certificates. ### Introduction to Alfresco keystores an truststores -When there is secure communication (i.e. HTTPS) between different Alfresco services, the following relationships must +When there is secure communication (i.e. HTTPS) between different Alfresco services, the following relationships must be satisfied: * **The Repository is a client of Solr**: @@ -158,45 +158,45 @@ be satisfied: * A Zeppelin key must be generated and must be included in the Zeppelin keystore (`ssl.repo.client.keystore`) * A Zeppelin public certificate must be included in the Repository truststore (`ssl.truststore`) * Note. the same key certificates is used for both Solr and Zeppelin, as both are clients of the Repository -* **When accessing Solr from a browser, the browser is client of Solr**: +* **When accessing Solr from a browser, the browser is client of Solr**: * A Browser key must be installed in the web browser in order to access Solr Web Console - + The following picture illustrates: ![secure-comms-repo-solr-keystores]({% link content-services/images/acs-secure-comms-repo-solr-keystores.png %}){:height="500px" width="700px"} - -Additionally, to support Alfresco encryption feature, a metadata cyphering key is generated and included on a keystore + +Additionally, to support Alfresco encryption feature, a metadata cyphering key is generated and included on a keystore to be used by the Repository when encrypting node properties. -These keystore and truststore files can be generated manually but it's easier to use the +These keystore and truststore files can be generated manually but it's easier to use the [https://github.com/Alfresco/alfresco-ssl-generator](https://github.com/Alfresco/alfresco-ssl-generator) GitHub project. Follow the [Search Services security documentation]({% link search-services/latest/config/keys.md %}) for information on how to set this up on Windows or Linux. ### Alfresco default keystore and backup keystore -The out-of-the-box Content Services installation has a pre-configured main keystore, which contains a secret key generated -by Content Services. If you want to use encrypted properties, you should create your own keystore with your own password, +The out-of-the-box Content Services installation has a pre-configured main keystore, which contains a secret key generated +by Content Services. If you want to use encrypted properties, you should create your own keystore with your own password, and update the metadata file appropriately. -The default keystore configuration protects the keys by using two levels of passwords - a keystore password and a password -for each key. Currently, the keystore contains only a metadata secret key that is used for encrypting and decrypting node +The default keystore configuration protects the keys by using two levels of passwords - a keystore password and a password +for each key. Currently, the keystore contains only a metadata secret key that is used for encrypting and decrypting node properties that are of type `d:encrypted`. -You can also configure a backup keystore. This is useful in case the keys need to be changed. The user can back up the +You can also configure a backup keystore. This is useful in case the keys need to be changed. The user can back up the main keystore to the backup keystore location and create a new keystore in its place. -If both the main and backup keystores are configured, the repository encryption works in the *fallback* mode. In this mode, -the node properties are decrypted with the main keystore's metadata key first. If that fails, the backup keystore's metadata +If both the main and backup keystores are configured, the repository encryption works in the *fallback* mode. In this mode, +the node properties are decrypted with the main keystore's metadata key first. If that fails, the backup keystore's metadata key is tried. This allows the keystores to be changed on the disk and reloaded without affecting the running of the repository. -Keystores are also used to protect the communication between the Repository and Solr using encryption and mutual -authentication. The keystores store RSA keys and certificates in this case. For more information on how to turn on -HTTPS between the Repository and Solr, and how to re-generate the default certificate, +Keystores are also used to protect the communication between the Repository and Solr using encryption and mutual +authentication. The keystores store RSA keys and certificates in this case. For more information on how to turn on +HTTPS between the Repository and Solr, and how to re-generate the default certificate, see [Solr security]({% link search-services/latest/config/security.md %}). ### Alfresco Keystore configuration -The way you configure keystores in Content Services has changed. Previously the configuration was stored in properties -files like `keystore-passwords.properties` with passwords in plain text. The following properties that were used to +The way you configure keystores in Content Services has changed. Previously the configuration was stored in properties +files like `keystore-passwords.properties` with passwords in plain text. The following properties that were used to configure the keystores have been *deprecated*. ```text @@ -221,15 +221,15 @@ JAVA_TOOL_OPTIONS: " " ``` ->**Note:** The old way of configuring keystores will still work for backwards compatibility but it's not recommended for +>**Note:** The old way of configuring keystores will still work for backwards compatibility but it's not recommended for security reasons. If the old approach is used you'll see a warning in the logs. You can configure the main and backup keystores using the `alfresco-global.properties` file. To configure the main keystore, set the following properties in the `alfresco-global.properties` file: -> **Note:** The "metadata-keystore" properties need to be specified in the `JAVA_TOOL_OPTIONS` property in -`/bin/catalina.sh` for Linux based users and `/bin/catalina.bat` for Microsoft Windows users. +> **Note:** The "metadata-keystore" properties need to be specified in the `JAVA_TOOL_OPTIONS` property in +`/bin/catalina.sh` for Linux based users and `/bin/catalina.bat` for Microsoft Windows users. The old keystore file can be found in the distribution zip `keystore/metadata-keystore`. Main keystore and backup: @@ -372,7 +372,7 @@ During bootstrap and JMX keystore reload and re-encryption operations, the repos Content Services uses cryptographic password hashing technique to securely store passwords. -All versions Content Services 6.2 used the MD4 (Message Digest 4) and SHA256 hash algorithms (mainly to support NLTM) to store critical data. But this is no longer considered a secure approach as the hashed password is very easy to decrypt. You now have the option to configure Content Services to use Bcrypt to store passwords. By default, the system uses MD4 to allow users to use MD4 hashed passwords for `alfrescoNTLM` authentication. +All versions prior to Alfresco One 5.1.5 used the MD4 (Message Digest 4) and SHA256 hash algorithms (mainly to support NLTM) to store critical data. But this is no longer considered a secure approach as the hashed password is very easy to decrypt. You now have the option to configure Content Services to use Bcrypt to store passwords. By default, the system uses MD4 to allow users to use MD4 hashed passwords for `alfrescoNTLM` authentication. Bcrypt is an adaptive hash function based on the Blowfish symmetric block cipher cryptographic algorithm. It is incredibly slow to hash input compared to other functions, but this results in a much better output hash. Content Services is configured to use a strength of `10` to provide a good compromise of speed and strength. @@ -390,7 +390,7 @@ To maintain backwards compatibility with previous versions, the default setting system.preferred.password.encoding=md4 ``` -After upgrading to Content Services 6.2, when the user logs in or changes the password, the system rehashes the password using the preferred encoding mechanism and stores the mechanism being used. If the preferred encoding is set to `md4`, the system moves the current hashed passwords for that user. +After upgrading to the latest Content Services version, when the user logs in or changes the password, the system rehashes the password using the preferred encoding mechanism and stores the mechanism being used. If the preferred encoding is set to `md4`, the system moves the current hashed passwords for that user. > **Note:** If SAML SSO is enabled, cryptographic password rehashing won't work at login. @@ -458,7 +458,7 @@ Here is the list of protected attributes (the value for these will be masked in * `cryptodoc.jce.keystore.password` * `ldap.synchronization.java.naming.security.credentials` -### Encrypting configuration properties +### Encrypting configuration properties You can encrypt sensitive properties in the `alfresco-global.properties` configuration file. @@ -654,7 +654,7 @@ An aspect can be applied at any time and there are no restrictions as to which a --> - + ``` @@ -796,7 +796,7 @@ When Content Services makes permission checks, ACEs are considered in order with The default configuration is `any deny denies`. This is set by adding the following property to the `alfresco-global.properties` file: ```text -security.anyDenyDenies=true +security.anyDenyDenies=true ``` You can alter the configuration to support `any allow allows`. This is set by adding the following property to the `alfresco-global.properties` file: @@ -1202,7 +1202,7 @@ If you lose or forget the password for the Admin user, you can reset the passwor SELECT anp1.node_id, anp1.qname_id, anp1.string_value - FROM alf_node_properties anp1 + FROM alf_node_properties anp1 INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id @@ -1225,9 +1225,9 @@ If you lose or forget the password for the Admin user, you can reset the passwor 2. To update the password, use the following command: ```sql - UPDATE alf_node_properties + UPDATE alf_node_properties SET string_value='209c6174da490caeb422f3fa5a7ae634' - WHERE + WHERE node_id=THENODEIDABOVE and qname_id=THEQNAMEVALUEABOVE @@ -1281,7 +1281,7 @@ If you lose or forget the password for the Admin user, you can reset the passwor SELECT anp1.node_id, anp1.qname_id, anp1.string_value - FROM alf_node_properties anp1 + FROM alf_node_properties anp1 INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id @@ -1304,9 +1304,9 @@ If you lose or forget the password for the Admin user, you can reset the passwor 2. To update the password, use the following command: ```sql - UPDATE alf_node_properties + UPDATE alf_node_properties SET string_value='209c6174da490caeb422f3fa5a7ae634' - WHERE + WHERE node_id=THENODEIDABOVE and qname_id=THEQNAMEVALUEABOVE @@ -1427,7 +1427,7 @@ If servers from other domains are allowed to POST requests to your system, then ``` -The CSRF filter compares the incoming request with the rule request elements to find one that matches and then invokes +The CSRF filter compares the incoming request with the rule request elements to find one that matches and then invokes the defined actions for that rule before normal Share processing begins. If you want to completely block certain services in the repository, you can add these URLs to the CSRF filter: @@ -1437,7 +1437,7 @@ If you want to completely block certain services in the repository, you can add ```xml + condition="CSRFPolicy" replace="true"> ``` 3. Copy the following code and add it as the first child of the ``  element: diff --git a/content-services/latest/config/index.md b/content-services/latest/config/index.md index 4d68ace313..4abfee1d82 100644 --- a/content-services/latest/config/index.md +++ b/content-services/latest/config/index.md @@ -540,7 +540,7 @@ The Spring bean definitions are within configuration files in the following dire The Activity Email Summary ignores certain activity types by default. Use this information to override the Spring bean definition to include these activity types. -The Spring bean definition for the ActivitiesFeed subsystem is called `activities-feed-context.xml` and can be downloaded from the Alfresco SVN: [`activities-feed-context.xml`](https://github.com/Alfresco/alfresco-community-repo/blob/release/6.2.2/repository/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/activities-feed-context.xml){:target="_blank"}. +The Spring bean definition for the ActivitiesFeed subsystem is called `activities-feed-context.xml` and can be downloaded from the Alfresco SVN: [`activities-feed-context.xml`](https://github.com/Alfresco/alfresco-community-repo/blob/release/7.0.0/repository/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/activities-feed-context.xml){:target="_blank"}. 1. Download the file and save to the `` directory. diff --git a/content-services/latest/config/repository.md b/content-services/latest/config/repository.md index 8951ff1b73..ac1884e5b7 100644 --- a/content-services/latest/config/repository.md +++ b/content-services/latest/config/repository.md @@ -472,7 +472,7 @@ For security reasons, configure your proxy to forward only requests to the resou 1. Set your proxy to forward the following URL extensions: ```bash - /share + /share /share/* /alfresco/api/*/public/cmis/versions/* /alfresco/api/*/public/alfresco/versions/* @@ -485,7 +485,7 @@ For security reasons, configure your proxy to forward only requests to the resou 2. If you're using WebDAV, add these URL extensions to your proxy: ```bash - /alfresco/webdav + /alfresco/webdav /alfresco/webdav/* ``` @@ -600,7 +600,7 @@ For security reasons, configure your proxy to forward only requests to the resou JkWorkersFile **/path/to/your/workers.properties** JkLogFile **/path/to/your/apache/log/mod\_jk.log** JkLogLevel info - JkShmFile **/path/to/your/apache/log/jk-runtime-status** + JkShmFile **/path/to/your/apache/log/jk-runtime-status** # ------- # SSL @@ -656,7 +656,7 @@ For security reasons, configure your proxy to forward only requests to the resou In this example, Apache is configured to accept strong encryption only. Adapt SSLCipherSuite if this causes you problems. -9. (Optional) Only required if configuring Alfresco Share. +9. (Optional) Only required if configuring Alfresco Share. Add and set the following properties in the `JAVA_OPTS` environmental variable referenced by the Share application, as they're required at Share start up: @@ -665,9 +665,9 @@ For security reasons, configure your proxy to forward only requests to the resou -Dcookies.sameSite=none ``` - When using Share with Chromium-based browsers (such as Google Chrome or the latest releases of Microsoft Edge) with either Alfresco Content Connector for Salesforce or the SAML Module, the share web must be secured using an HTTPS (SSL/TLS) certificate. + When using Share with Chromium-based browsers (such as Google Chrome or the latest releases of Microsoft Edge) with either Alfresco Content Connector for Salesforce or the SAML Module, the share web must be secured using an HTTPS (SSL/TLS) certificate. -10. (Optional) Only required if configuring Alfresco Share. +10. (Optional) Only required if configuring Alfresco Share. Add and set the property in the `JAVA_OPTS` environmental variable corresponding to the JVM of the Tomcat instance when deploying Share: @@ -775,7 +775,7 @@ Here's an example of how to configure Tomcat 8.5 to work with HTTPS for your dev aos.baseUrlOverwrite=https://localhost:7070/alfresco/aos ``` -7. (Optional) Only required if configuring Alfresco Share to use HTTPS. +7. (Optional) Only required if configuring Alfresco Share to use HTTPS. Add and set the following properties in the `JAVA_OPTS` environmental variable referenced by the Share application, as they're required at Share start up: @@ -786,7 +786,7 @@ Here's an example of how to configure Tomcat 8.5 to work with HTTPS for your dev When using Share with Chromium-based browsers (such as Google Chrome or the latest releases of Microsoft Edge), the Share communication must be secured using an HTTPS (SSL/TLS) certificate. -8. (Optional) Only required if configuring Alfresco Share to use HTTPS. +8. (Optional) Only required if configuring Alfresco Share to use HTTPS. Add and set the property in the `JAVA_OPTS` environmental variable corresponding to the JVM of the Tomcat instance when deploying Share: @@ -824,7 +824,7 @@ From Alfresco One version 5.0 and later, the caches can be configured by setting > **Note:** It's advisable not to change the cache values unless you have performance issues. -1. Download the files [tx-cache-context.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/6.2.2/repository/src/main/resources/alfresco/tx-cache-context.xml){:target="_blank"} and [caches.properties](https://github.com/Alfresco/alfresco-community-repo/blob/release/6.2.2/repository/src/main/resources/alfresco/caches.properties){:target="_blank"}. +1. Download the files [tx-cache-context.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/7.0.0/repository/src/main/resources/alfresco/tx-cache-context.xml){:target="_blank"} and [caches.properties](https://github.com/Alfresco/alfresco-community-repo/blob/release/7.0.0/repository/src/main/resources/alfresco/caches.properties){:target="_blank"}. The `caches.properties` file lists a series of properties for configuring a cache. The cache properties are used for both clustered and non-clustered configurations. @@ -969,10 +969,10 @@ The MIME type is available in the repository. ## Configure metadata extraction -Metadata extraction automatically extracts metadata information from inbound and/or updated content and updates the +Metadata extraction automatically extracts metadata information from inbound and/or updated content and updates the corresponding nodes properties with the metadata values. -For more information see [metadata extraction extension point]({% link content-services/latest/develop/repo-ext-points/metadata-extractors.md %}). +For more information see [metadata extraction extension point]({% link content-services/latest/develop/repo-ext-points/metadata-extractors.md %}). ## About aspects @@ -1014,7 +1014,7 @@ To change this behavior, you can set `cm:autoVersionOnUpdateProps` to `true`. Edit the `contentModel.xml` file to enable versioning for all content in the repository. -1. Download the [contentModel.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/6.2.2/repository/src/main/resources/alfresco/model/contentModel.xml){:target="_blank"} file. +1. Download the [contentModel.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/7.0.0/repository/src/main/resources/alfresco/model/contentModel.xml){:target="_blank"} file. 2. Create a `$TOMCAT\_HOME/shared/classes/alfresco/extension/models` directory. @@ -1130,7 +1130,7 @@ Follow these replication steps for the MySQL database. This task describes how to customize content transformations. -1. Download the [content-services-context.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/6.2.2/repository/src/main/resources/alfresco/content-services-context.xml){:target="_blank"} file. +1. Download the [content-services-context.xml](https://github.com/Alfresco/alfresco-community-repo/blob/release/7.0.0/repository/src/main/resources/alfresco/content-services-context.xml){:target="_blank"} file. 2. Paste this file into the `` directory, and open the file. diff --git a/content-services/latest/config/smart-folders/index.md b/content-services/latest/config/smart-folders/index.md index 9a4b7ad1d5..dc7e689316 100644 --- a/content-services/latest/config/smart-folders/index.md +++ b/content-services/latest/config/smart-folders/index.md @@ -238,7 +238,7 @@ A node is defined by the following properties: | language | Mandatory property, set to `fts-alfresco`. | | query | Mandatory FTS query that defines the folder content. | | filing | Optional rule that defines the filing action for a new file when it is uploaded to the Smart Folder. If no filing rule is defined, files can't be uploaded to that folder. Parameters include: {::nomarkdown}
  • path: path where a document is physically stored
  • classification: type and aspects assigned to the new file
  • properties: property values attributed to the new file
{:/} | -| path | Mandatory property in a filing rule. Path to store new documents. This is the [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/6.2.2/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded `QName`. | +| path | Mandatory property in a filing rule. Path to store new documents. This is the [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/7.0.0/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded `QName`. | | classification | Mandatory property in a filing rule. Type and aspects of the new object. | | properties | Optional property. Defines property values and inheritance. | @@ -246,13 +246,13 @@ Here are some tips on notation: * Use percent (%) signs to use predefined placeholders in queries and filing rules * For repository path expressions use QNames, for example; `/app:company_home/st:sites/cm:swsdp/cm:documentLibrary`. -* Special characters and whitespace are [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/6.2.2/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded. Use this notation to encode special characters in repository path names. For example, use `_x0020_` for the whitespace character. +* Special characters and whitespace are [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/7.0.0/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded. Use this notation to encode special characters in repository path names. For example, use `_x0020_` for the whitespace character. | Placeholder | Description | | ----------- | ----------- | -| %ACTUAL_PATH% | [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/6.2.2/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded repository path of the physical parent folder. Only the physical parent folder (or next physical folder up the folder tree) can use `%ACTUAL_PATH%`. | +| %ACTUAL_PATH% | [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/7.0.0/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded repository path of the physical parent folder. Only the physical parent folder (or next physical folder up the folder tree) can use `%ACTUAL_PATH%`. | | %CURRENT_USER% | Account name of the user. | -| \_x0020\_ | [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/6.2.2/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded whitespace character. | +| \_x0020\_ | [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/7.0.0/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded whitespace character. | | <> | Use angle brackets, for example, ``, to inherit property values from the physical parent folder. Used for inheritance in a filing rule and in a query. | The following code fragments give more information about these properties. @@ -309,7 +309,7 @@ Information is populated by running a search query: } }, { - ... + ... } ] } @@ -367,7 +367,7 @@ These define the path where a document uploaded to a Smart Folder should be crea The path can be an existing folder location, for example: - * Using an XPath expression, and ensuring the expression is [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/6.2.2/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded: + * Using an XPath expression, and ensuring the expression is [ISO9075](https://github.com/Alfresco/alfresco-community-repo/tree/release/7.0.0/data-model/src/main/java/org/alfresco/util){:target="_blank"} encoded: ```json "path":"/app:company_home/cm:Claims_x0020_Pool" @@ -436,12 +436,12 @@ smart.folders.model.labels=alfresco/messages/smartfolder-model #Smart store config -#Company home relative download associations of smart entries +#Company home relative download associations of smart entries #smart.download.associations.folder=${spaces.dictionary.childname}/${spaces.smartdownloads.childname} #Generic virtualization methods config -#Vanilla JSON templates javascript processor classpath. A java script processor used to +#Vanilla JSON templates javascript processor classpath. A java script processor used to #covert JSON templates to internal smart folder definitions. #smart.folders.config.vanilla.processor.classpath=/org/alfresco/repo/virtual/node/vanilla.js @@ -471,7 +471,7 @@ smart.folders.model.labels=alfresco/messages/smartfolder-model #A company home relative name or qname path location of the type mapped templates. #smart.folders.config.type.templates.path=${spaces.dictionary.childname}/${spaces.smartfolders.childname} -#Type and aspect qname regular expression filter. +#Type and aspect qname regular expression filter. #smart.folders.config.type.templates.qname.filter=none ``` diff --git a/content-services/latest/develop/reference/aikau-intro-ref.md b/content-services/latest/develop/reference/aikau-intro-ref.md index c7053c15c0..8dad0afe43 100644 --- a/content-services/latest/develop/reference/aikau-intro-ref.md +++ b/content-services/latest/develop/reference/aikau-intro-ref.md @@ -2,17 +2,16 @@ title: Introduction to Aikau --- -There are a number of updated UI framework features that were introduced in Alfresco One 4.2 and further expanded in -Content Services 6.2. The updated UI framework goes by the name of Aikau. +There are a number of updated UI framework features that were introduced in Alfresco One 4.2 and further expanded in later versions of Content Services. The updated UI framework goes by the name of Aikau. ## Goals -The main purpose of Aikau is to provide a library of widgets that can be easily assembled into a web application for -accessing a repository. The aim is not to replace Share but it was necessary to migrate away from its original -implementation, which was based around the Surf paradigms of pages, templates, components and web scripts, towards a +The main purpose of Aikau is to provide a library of widgets that can be easily assembled into a web application for +accessing a repository. The aim is not to replace Share but it was necessary to migrate away from its original +implementation, which was based around the Surf paradigms of pages, templates, components and web scripts, towards a solution that provided for rapid development and customization. -While Share continues to be based primarily on the [YUI library](https://yuilibrary.com/){:target="_blank"}, Aikau is based around +While Share continues to be based primarily on the [YUI library](https://yuilibrary.com/){:target="_blank"}, Aikau is based around the [Dojo library](https://dojotoolkit.org/){:target="_blank"}. The main goals of Aikau are: @@ -25,54 +24,54 @@ The main goals of Aikau are: ## Building on previous work -Between versions 4.0 to 4.2 there were significant enhancements to the Surf framework and deliberate refactoring of logic -from the FreeMarker template into the JavaScript controller of the Share web scripts. Improvements to page load +Between versions 4.0 to 4.2 there were significant enhancements to the Surf framework and deliberate refactoring of logic +from the FreeMarker template into the JavaScript controller of the Share web scripts. Improvements to page load performance were achieved by reducing HTTP requests through the following methods: * Using [MD5 checksums]({% link content-services/latest/develop/reference/surf-framework-ref.md %}#surf-checksums) to allow browsers to safely cache resources indefinitely * [Dynamically aggregating]({% link content-services/latest/develop/reference/surf-framework-ref.md %}#aggregate) JavaScript and CSS dependencies into fewer resources * [Encoding images]({% link content-services/latest/develop/reference/surf-framework-ref.md %}#css) directly into CSS files. -All of these features are leveraged in the improvements and this makes it easier to produce faster, more reliable pages, +All of these features are leveraged in the improvements and this makes it easier to produce faster, more reliable pages, in less time for Alfresco Share web applications. ## Zero build -An important enhancement is a zero build approach. Surf is able to dynamically analyze the JSON model that defines the -page being rendered and resolve all JavaScript dependencies that are then compressed and written into a single JavaScript -resource that simulates a built Dojo layer. Surf caches all the dependency relationships as it finds them so it never -traverses a dependency path a second time. It also caches the individual layers it generates so although the very first +An important enhancement is a zero build approach. Surf is able to dynamically analyze the JSON model that defines the +page being rendered and resolve all JavaScript dependencies that are then compressed and written into a single JavaScript +resource that simulates a built Dojo layer. Surf caches all the dependency relationships as it finds them so it never +traverses a dependency path a second time. It also caches the individual layers it generates so although the very first page rendered after server start up can take a few seconds to render, subsequent page rendering is much faster. ## Encapsulation -When you render a web you are normally expected to take care of the styling by using separately referenced CSS files. +When you render a web you are normally expected to take care of the styling by using separately referenced CSS files. For example, you might import a theme style sheet for the framework that you are using. -In the updated UI framework, each widget can optionally define its own CSS resources, including the ability to specify -different resources for different media types. If that widget is used on a page then Surf will automatically include -those CSS resources within a single aggregated CSS resource loaded on the page. The same principle is applied to -localization files so the use of a widget ensures that its National Language Support (NLS) properties automatically -built into a JavaScript resource loaded on the page. Widgets can scope their message bundles to ensure that there are -no collisions and the core message handling function is smart enough to work through all of the message scopes in a +In the updated UI framework, each widget can optionally define its own CSS resources, including the ability to specify +different resources for different media types. If that widget is used on a page then Surf will automatically include +those CSS resources within a single aggregated CSS resource loaded on the page. The same principle is applied to +localization files so the use of a widget ensures that its National Language Support (NLS) properties automatically +built into a JavaScript resource loaded on the page. Widgets can scope their message bundles to ensure that there are +no collisions and the core message handling function is smart enough to work through all of the message scopes in a widgets ancestry to ensure that the most specific message is displayed. ## Cross JavaScript library support -Although Share was originally built using YUI2, JQuery plugins have also been introduced and it can not be restricted -to using Dojo. The UI framework is designed to easily support widgets provided by other libraries and by design it is -possible to swap out Dojo widgets for those provided by other libraries. A mechanism exists for wrapping our existing -YUI2-centric widgets to that they can be referenced in the JSON model for the page. The Calendar of any Share site uses +Although Share was originally built using YUI2, JQuery plugins have also been introduced and it can not be restricted +to using Dojo. The UI framework is designed to easily support widgets provided by other libraries and by design it is +possible to swap out Dojo widgets for those provided by other libraries. A mechanism exists for wrapping our existing +YUI2-centric widgets to that they can be referenced in the JSON model for the page. The Calendar of any Share site uses a combination of the YUI2, JQuery and Dojo libraries. ## Continued extensibility -One of Share's greatest strengths is its ability to be easily customized. This is something that has been enhanced over -the last few releases. A significant improvement was to make it easier to -[customize the client-side widgets that are instantiated]({% link content-services/latest/develop/share-ext-points/surf-widgets.md %}#customizesurfwidgetinit) -on each page by customizing the JavaScript controller of a Component's web script. It is also possible to customize -the numerous fine-grained widgets that comprise a page or Component. Widgets can be reconfigured, added or removed -easily and because the widgets are decoupled (such that they do not rely on the existence of other widgets) making +One of Share's greatest strengths is its ability to be easily customized. This is something that has been enhanced over +the last few releases. A significant improvement was to make it easier to +[customize the client-side widgets that are instantiated]({% link content-services/latest/develop/share-ext-points/surf-widgets.md %}#customizesurfwidgetinit) +on each page by customizing the JavaScript controller of a Component's web script. It is also possible to customize +the numerous fine-grained widgets that comprise a page or Component. Widgets can be reconfigured, added or removed +easily and because the widgets are decoupled (such that they do not rely on the existence of other widgets) making changes will not cause any errors. ## Aikau use in Share diff --git a/content-services/latest/develop/rest-api-guide/install.md b/content-services/latest/develop/rest-api-guide/install.md index b0b2f4cbeb..ac13a433e6 100644 --- a/content-services/latest/develop/rest-api-guide/install.md +++ b/content-services/latest/develop/rest-api-guide/install.md @@ -4,73 +4,73 @@ title: Install and authenticate This page provides information about the Alfresco ReST API Explorer, how to install it and use it. -The Alfresco ReST API v1 is described in the OpenAPI specification format (formerly Swagger specification). This is -good as lots of different tools can read this format, and you can also use the specification to generate ReST API clients +The Alfresco ReST API v1 is described in the OpenAPI specification format (formerly Swagger specification). This is +good as lots of different tools can read this format, and you can also use the specification to generate ReST API clients in different languages, such as Java. -Alfresco uses the Alfresco ReST API OpenAPI specification to provide an [API Explorer](https://github.com/Alfresco/rest-api-explorer){:target="_blank"}, -so you can easily read about all the APIs and try them out. The API Explorer comes in the format of a WAR file that +Alfresco uses the Alfresco ReST API OpenAPI specification to provide an [API Explorer](https://github.com/Alfresco/rest-api-explorer){:target="_blank"}, +so you can easily read about all the APIs and try them out. The API Explorer comes in the format of a WAR file that needs to be installed (dropped) into your ACS installation. -If you just want to have a look at the latest API Explorer, then you can use an online version of it available here: +If you just want to have a look at the latest API Explorer, then you can use an online version of it available here: [https://api-explorer.alfresco.com/api-explorer/](https://api-explorer.alfresco.com/api-explorer/){:target="_blank"} ## Installing -Most likely you would want to install the API Explorer into your local ACS installation. You can find the -Alfresco API Explorer WAR file in [Alfresco’s Nexus repository](https://artifacts.alfresco.com/nexus/#nexus-search;quick~api-explorer){:target="_blank"}. +Most likely you would want to install the API Explorer into your local ACS installation. You can find the +Alfresco API Explorer WAR file in [Alfresco’s Nexus repository](https://artifacts.alfresco.com/nexus/#nexus-search;quick~api-explorer){:target="_blank"}. Pick the version that closest matches your ACS installation. -To install the WAR file follow one of two approaches. If you are using a trial version of ACS then you follow the first -approach described below. If you are using the [Alfresco SDK]({% link content-services/latest/develop/sdk.md %}) -you would want to follow the second approach. The main difference between the two is that the first one will lead to -loss of the data that you are working with as the ACS trial Docker Compose file does not use volumes +To install the WAR file follow one of two approaches. If you are using a trial version of ACS then you follow the first +approach described below. If you are using the [Alfresco SDK]({% link content-services/latest/develop/sdk.md %}) +you would want to follow the second approach. The main difference between the two is that the first one will lead to +loss of the data that you are working with as the ACS trial Docker Compose file does not use volumes (i.e. it does not store data externally but instead inside the container). -### Installing the WAR file into an ACS Trial environment +### Installing the WAR file into an ACS Trial environment >**IMPORTANT!** you will lose your data/content when you do this) 1. Create a directory somewhere for Repository extension files and copy the War file there - Now, copy the WAR file, for example `api-explorer-6.2.0.war` into this new directory. Then rename the file to `api-explorer.war`. + Now, copy the WAR file, for example `api-explorer-7.0.0.war` into this new directory. Then rename the file to `api-explorer.war`. 2. Create a `Dockerfile` for the new custom Repository Docker Image - As a developer you are most likely running ACS 6.x via a Docker Compose file, either via trial or SDK. The `Dockerfile` - will be based on the Repository Image that is used in the `docker-compose.xml` file. Have a look in it and you should see + As a developer you are most likely running ACS 6.x via a Docker Compose file, either via trial or SDK. The `Dockerfile` + will be based on the Repository Image that is used in the `docker-compose.xml` file. Have a look in it and you should see that it starts with defining the Alfresco Repository Docker image: - + ```text version: "2" - + services: alfresco: - image: alfresco/alfresco-content-repository:6.2.0 + image: alfresco/alfresco-content-repository:7.0.0 ... ``` - + With this information we know what Docker Image to base our custom Repo Docker Image on. Create a `Dockerfile` in the same directory as the WAR file and have it look like this: - + ```text - FROM alfresco/alfresco-content-repository:6.2.0 - + FROM alfresco/alfresco-content-repository:7.0.0 + ARG TOMCAT_DIR=/usr/local/tomcat - + # Copy the ReST API Explorer into the Tomcat Webapps directory COPY api-explorer.war $TOMCAT_DIR/webapps/ ``` - + What this `Dockerfile` will do is build a custom Repository Docker image that is based on the out-of-the-box Alfresco Repository Docker image that you are using. It will then copy in the `api-explorer.war` into the `tomcat/webapps` directory where it will be picked up and deployed. 3. Build the custom Alfresco Repository Docker image When we got the Dockerfile completed we just need to build the custom Docker image as follows, standing in the directory with all the files: - + ```bash repo mbergljung$ docker build -t alf-repo-custom:1.0 . Sending build context to Docker daemon 954.4kB - Step 1/3 : FROM alfresco/alfresco-content-repository:6.2.0 + Step 1/3 : FROM alfresco/alfresco-content-repository:7.0.0 ---> 5439a493ee0a Step 2/3 : ARG TOMCAT_DIR=/usr/local/tomcat ---> Using cache @@ -81,9 +81,9 @@ loss of the data that you are working with as the ACS trial Docker Compose file Successfully built 1766782c545a Successfully tagged alf-repo-custom:1.0 ``` - + Check that you got the custom Docker image: - + ```bash repo mbergljung$ docker image ls |grep alf- alf-repo-custom 1.0 1766782c545a About a minute ago 1.16GB @@ -92,10 +92,10 @@ loss of the data that you are working with as the ACS trial Docker Compose file 4. Update the `docker-compose.xml` file to use the new custom image Open up the `docker-compose.xml` file and change it so the Repository service is based on the custom Docker Image we just created. It should now look something like this: - + ```text version: "2" - + services: alfresco: image: alf-repo-custom:1.0 @@ -105,45 +105,45 @@ loss of the data that you are working with as the ACS trial Docker Compose file 5. Restart ACS We have made changes only to the Repository container, also known as the **alfresco** Docker Compose service, but we need to remove and restart all containers so data is in sync (basically we are starting over with an empty repository). After we have created our own Docker Image for the Alfresco Repository container and configured Docker Compose with it we can restart as follows by doing **Ctrl-C** out of the log, this will stop all containers, we then remove them, followed by starting it up again: - + ```bash ^CGracefully stopping... (press Ctrl+C again to force) Stopping acs62_alfresco-pdf-renderer_1 ... done ... - - acs61 mbergljung$ docker-compose rm + + acs61 mbergljung$ docker-compose rm Going to remove acs62_alfresco-pdf-renderer_1, acs62_transform-router_1, acs62_libreoffice_1, acs62_tika_1, acs62_imagemagick_1, acs62_proxy_1, acs62_share_1, acs62_postgres_1, acs62_digital-workspace_1, acs62_alfresco_1, acs62_activemq_1, acs62_solr6_1, acs62_shared-file-store_1 Are you sure? [yN] y Removing acs62_alfresco-pdf-renderer_1 ... done ... - - acs61 mbergljung$ docker-compose up - Creating acs62_alfresco-pdf-renderer_1 ... done - ... + + acs61 mbergljung$ docker-compose up + Creating acs62_alfresco-pdf-renderer_1 ... done + ... ``` ### Installing the WAR file into an Alfresco SDK AIO project 1. Copy API Explorer WAR file into the SDK project - Copy the `api-explorer-6.2.0.war` into the `aio/aio-platform-docker/src/main/docker` AIO SDK directory. Then rename the file to `api-explorer.war`. + Copy the `api-explorer-7.0.0.war` into the `aio/aio-platform-docker/src/main/docker` AIO SDK directory. Then rename the file to `api-explorer.war`. 2. Open up the platform/repository Docker file and add the command to copy the `api-explorer.war` into `tomcat/webapps` The platform (repository) `Dockerfile` is located in the `aio/aio-platform-docker/src/main/docker` AIO SDK directory. Add the following COPY command at the end of this file: - + ```text - ... + ... # Copy the ReST API Explorer into the Tomcat Webapps directory COPY api-explorer.war $TOMCAT_DIR/webapps/ ``` - + What this Dockerfile will do is build a custom Repository Docker image that is based on the out-of-the-box Alfresco Repository Docker image that you are using. After it has copied in all the extensions, config files, license etc it will finish by copying in the `api-explorer.war` into the `tomcat/webapps` directory where it will be picked up and deployed. 3. Restart the platform/repository container We have changed only the platform/repository, so it is enough to just restart this container: - + ```bash acs61-aio mbergljung$ ./run.sh reload_acs Killing docker_acs62-aio-acs_1 ... done @@ -162,7 +162,7 @@ You should now be able to access the API Explorer at [http://localhost:8080/api- ## Getting started -You make API requests by sending a URL using one of five HTTP API methods, GET, POST, PUT, DELETE, and OPTIONS. Here's +You make API requests by sending a URL using one of five HTTP API methods, GET, POST, PUT, DELETE, and OPTIONS. Here's an example of a URL to get all sites in a local Alfresco installation: ```http @@ -174,9 +174,9 @@ You can use the ReST API Explorer to make this request: * In your web browser, navigate to `[http://localhost:8080/api-explorer/#!/sites/listSites](http://localhost:8080/api-explorer/#!/sites/listSites)`. You'll see full documentation for the **GET /sites** API method, including the query and body parameter formats, and the expected and error response schemas. * At the end of the description you'll see the **Try it out!** button. Press it now. -You've just made your first Alfresco ReST API request. You will see the request URL you've just invoked, the -corresponding Curl command, the JSON response body that the Alfresco repository has returned, the HTTP response code, -and the response headers: +You've just made your first Alfresco ReST API request. You will see the request URL you've just invoked, the +corresponding Curl command, the JSON response body that the Alfresco repository has returned, the HTTP response code, +and the response headers: ![dev-api-by-language-alf-rest-api-explorer-2]({% link content-services/images/dev-api-by-language-alf-rest-api-explorer-2.png %}) @@ -186,8 +186,8 @@ Note this call returns a list of site `entries`. All lists returned by the Alfre Information about the `cURL` command line tool that can be used to make HTTP calls. -When we have an ACS Server up and running we also need a tool that can be used to make HTTP requests to the server. -The ReST API is accessed via HTTP and returns responses in JSON. We could use a Web Browser for all API calls that +When we have an ACS Server up and running we also need a tool that can be used to make HTTP requests to the server. +The ReST API is accessed via HTTP and returns responses in JSON. We could use a Web Browser for all API calls that require HTTP GET, but lots of API calls will need a client that can execute HTTP POST and HTTP PUT operations. So it is best to start working with a tool that can make HTTP GET, POST, and PUT calls. @@ -195,7 +195,7 @@ So it is best to start working with a tool that can make HTTP GET, POST, and PUT One such tool is **cURL** and it is commonly available on most Linux based systems. Check if you have it by doing: ```bash -$ curl +$ curl curl: try 'curl --help' or 'curl --manual' for more information ``` @@ -205,19 +205,19 @@ If you don’t have curl installed you can find it here: [https://curl.haxx.se/] Information about the `jq` command line tool that can be used to format JSON responses. -The Alfresco ReST API will return responses in JSON format. When we work with the ReST API from the command line via +The Alfresco ReST API will return responses in JSON format. When we work with the ReST API from the command line via cURL these JSON responses will not be formatted in a way that is easily readable. -So it would be good to feed it into some utility that could format the JSON. For this we can use a tool called **jq**. -It can be found here: [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/){:target="_blank"}. Install it and +So it would be good to feed it into some utility that could format the JSON. For this we can use a tool called **jq**. +It can be found here: [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/){:target="_blank"}. Install it and you should be ready to go with the rest of this section. ## Authenticate with the repository {#auth} -Before you can call any of the API endpoints, except a few that don't require authentication, you need to -authenticate with the repository so your operations are executed on behalf of a specific user. When you authenticate -successfully a ticket is returned that can be used in subsequent calls to the API. A ticket is valid for a specific time, -so if you don't make any calls for a while, then you might get 401 errors back, which means you need to authenticate +Before you can call any of the API endpoints, except a few that don't require authentication, you need to +authenticate with the repository so your operations are executed on behalf of a specific user. When you authenticate +successfully a ticket is returned that can be used in subsequent calls to the API. A ticket is valid for a specific time, +so if you don't make any calls for a while, then you might get 401 errors back, which means you need to authenticate again to get a new ticket. ### Authenticating to get a ticket @@ -237,21 +237,21 @@ $ curl --header "Content-Type: application/json" --request POST --data '{"userId } ``` -Here I’m logging in as **admin** with password **admin**, which is common for local developer/test installations of ACS. -But you can use any other username/password combination that represents a user in the Alfresco User database, being it -local or linked to LDAP. However, it's good to use the **admin** user when you are playing around with the ReST API as -you will almost always get a response back as you have full access. You don't have to worry about the user having the +Here I’m logging in as **admin** with password **admin**, which is common for local developer/test installations of ACS. +But you can use any other username/password combination that represents a user in the Alfresco User database, being it +local or linked to LDAP. However, it's good to use the **admin** user when you are playing around with the ReST API as +you will almost always get a response back as you have full access. You don't have to worry about the user having the correct permissions to execute the call, having access to the content, etc. A ticket is return inside a JSON object. -We can make the POST call a bit shorter as `-H` is short for `--header` and `-d` for `--data`. The `-request POST` +We can make the POST call a bit shorter as `-H` is short for `--header` and `-d` for `--data`. The `-request POST` part is optional if you use `-d`, as the `-d` flag implies a POST request. So the call can also be executed as follows: ```bash $ curl -H "Content-Type: application/json" -d '{"userId":"admin","password":"admin"}' http://localhost:8080/alfresco/api/-default-/public/authentication/versions/1/tickets | jq -{ - "entry": { - "id": "TICKET_08eb7e2e2c17964ca51f0f33186cc2fc9d56d593", - "userId": "admin" +{ + "entry": { + "id": "TICKET_08eb7e2e2c17964ca51f0f33186cc2fc9d56d593", + "userId": "admin" } } ``` @@ -285,8 +285,8 @@ powershell "[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(\"TICKET_08 ### Using the ticket -Now when we got a base64 encoded ticket, such as `VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=`, -we can start using it in an API call. The way we use the ticket in a Curl call is to add it with the `Authorization` +Now when we got a base64 encoded ticket, such as `VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=`, +we can start using it in an API call. The way we use the ticket in a Curl call is to add it with the `Authorization` header as follows: ```bash diff --git a/content-services/latest/install/containers/helm.md b/content-services/latest/install/containers/helm.md index 94077c34e1..7440dadc01 100644 --- a/content-services/latest/install/containers/helm.md +++ b/content-services/latest/install/containers/helm.md @@ -4,7 +4,7 @@ title: Install using Helm Alfresco Content Services (ACS) is an Enterprise Content Management (ECM) system that's used for document and case management, project collaboration, web content publishing, and compliant records management. The flexible compute, storage, and database services that Kubernetes offers make it an ideal platform for Content Services. This Helm chart presents an enterprise-grade Content Services configuration that you can adapt to virtually any scenario with the ability to scale up, down or out, depending on your use case. ->Before starting a production installation make sure you are familiar with +>Before starting a production installation make sure you are familiar with [how to secure your installation]({% link content-services/latest/admin/securing-install.md %}). The Helm chart in this repository supports deploying the Enterprise or Community Edition of Content Services. @@ -366,7 +366,7 @@ Since you deployed Enterprise, you'll also have access to: * Alfresco Digital Workspace: `https://acs.YOUR-DOMAIN-NAME/workspace/` * Alfresco Sync Service: `https://acs.YOUR-DOMAIN-NAME/syncservice/healthcheck` -If you're running Content Services 6.2 (i.e. the latest version) and already have a valid license file for this version, you can apply it directly to the running system. Navigate to the Admin Console and apply your license: +If you're running Content Services 7.0 (i.e. the latest version) and already have a valid license file for this version, you can apply it directly to the running system. Navigate to the Admin Console and apply your license: * [https://acs.YOUR-DOMAIN-NAME/alfresco/service/enterprise/admin/admin-license](http://localhost:8080/alfresco/service/enterprise/admin/admin-license){:target="_blank"} (this only applies for the Enterprise Download Trial) * Default username and password is `admin` diff --git a/content-services/latest/install/containers/index.md b/content-services/latest/install/containers/index.md index e3b0c98f7d..2b33e8fb7c 100644 --- a/content-services/latest/install/containers/index.md +++ b/content-services/latest/install/containers/index.md @@ -122,7 +122,7 @@ The packaging project is used to build the repository artifacts, such as the Doc Note that the Docker files for Alfresco Share, Alfresco Search Services, and other services are in their own projects: -* Alfresco Share: [https://github.com/Alfresco/share/tree/support/HF/6.2.2](https://github.com/Alfresco/share/tree/support/HF/6.2.2){:target="_blank"} +* Alfresco Share: [https://github.com/Alfresco/share/tree/alfresco-share-parent-7.0.0](https://github.com/Alfresco/share/tree/alfresco-share-parent-7.0.0){:target="_blank"} * Alfresco Search Services: [https://github.com/Alfresco/SearchServices](https://github.com/Alfresco/SearchServices){:target="_blank"} * Alfresco Content Services Nginx Proxy: [https://github.com/Alfresco/acs-ingress](https://github.com/Alfresco/acs-ingress){:target="_blank"} diff --git a/content-services/latest/install/zip/amp.md b/content-services/latest/install/zip/amp.md index b05b4be0c6..09bf15ef87 100644 --- a/content-services/latest/install/zip/amp.md +++ b/content-services/latest/install/zip/amp.md @@ -5,7 +5,7 @@ nav: false An Alfresco Module Package (AMP) is a bundle of code, content model, content, and the directory structure that is used to distribute additional functionality for Content Services. Use the Module Management Tool (MMT) to install and manage AMP files. You can install an AMP in an Alfresco WAR using the MMT, or by using the `apply_amps` tool. -The MMT is available as a JAR file from the distribution zip (`alfresco-content-services-distribution-6.2.x.zip`), in the zip's `/bin` directory. Place the `/bin` directory and its contents in the same location where you extracted the Content Services distribution zip; for example `/bin`. +The MMT is available as a JAR file from the distribution zip (`alfresco-content-services-distribution-7.0.x.zip`), in the zip's `/bin` directory. Place the `/bin` directory and its contents in the same location where you extracted the Content Services distribution zip; for example `/bin`. 1. Browse to the `/bin` directory, for example: diff --git a/content-services/latest/install/zip/index.md b/content-services/latest/install/zip/index.md index 6e8954fea3..a0eeac67d9 100644 --- a/content-services/latest/install/zip/index.md +++ b/content-services/latest/install/zip/index.md @@ -64,8 +64,8 @@ Here's a list of the files to download and install. | File | Description | | ---- | ----------- | -| alfresco-content-services-distribution-6.2.x.zip | Content Services distribution zip for new installations or upgrades. Alfresco WAR files (in distribution zip) for a manual install into an existing Tomcat application server. This distribution zip also contains the Module Management Tool (MMT) and the sample extension files, such as `alfresco-global.properties`. | -|alfresco-search-services-1.4.x.zip | Alfresco Search Services distribution zip.

See [Install Alfresco Search Services]({% link search-services/latest/install/index.md %}) for more information. | +| alfresco-content-services-distribution-7.0.x.zip | Content Services distribution zip for new installations or upgrades. Alfresco WAR files (in distribution zip) for a manual install into an existing Tomcat application server. This distribution zip also contains the Module Management Tool (MMT) and the sample extension files, such as `alfresco-global.properties`. | +|alfresco-search-services-2.0.x.zip | Alfresco Search Services distribution zip.

See [Install Alfresco Search Services]({% link search-services/latest/install/index.md %}) for more information. | ## Preparing the filesystem and database diff --git a/content-services/latest/install/zip/tomcat.md b/content-services/latest/install/zip/tomcat.md index a951b883ba..4cd1017b4f 100644 --- a/content-services/latest/install/zip/tomcat.md +++ b/content-services/latest/install/zip/tomcat.md @@ -6,7 +6,7 @@ For more complex Content Services installations, or if you wish to use an existi Use this method of installing Content Services if you've already have installed a JRE, a supported database, a supported application server, a message broker, and the additional components. -For information about securing Tomcat, see [Tomcat security considerations](https://tomcat.apache.org/tomcat-8.5-doc/security-howto.html){:target="_blank"}. +For information about securing Tomcat, see [Tomcat security considerations](https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html){:target="_blank"}. ## Install application server @@ -103,7 +103,7 @@ The Content Services distribution file is a zip containing the required WAR file 1. Browse to the [Alfresco Support Portal](https://support.alfresco.com/){:target="_blank"}. -2. Download the file: `alfresco-content-services-distribution-6.2.x.zip` +2. Download the file: `alfresco-content-services-distribution-7.0.x.zip` 3. Specify a location for the download and extract the file to a system directory; for example ``. @@ -253,5 +253,5 @@ Next, you can [customize applications]({% link content-services/latest/config/in ### Adding a reverse proxy in front of Content Services -See [adding a reverse proxy]({% link content-services/latest/admin/securing-install.md %}#addreverseproxy) +See [adding a reverse proxy]({% link content-services/latest/admin/securing-install.md %}#addreverseproxy) for more information. \ No newline at end of file diff --git a/content-services/latest/tutorial/share/doclib.md b/content-services/latest/tutorial/share/doclib.md index dd6efa94a5..52b6acc962 100644 --- a/content-services/latest/tutorial/share/doclib.md +++ b/content-services/latest/tutorial/share/doclib.md @@ -10,26 +10,26 @@ These are tutorials for the Document Library in an Alfresco Share site. **Description**: -In many extension projects you want to customize the Document Library in Alfresco Share. And quite often this involves -adding new actions that can be applied to the content in the library. These actions are referred to as "DocLib" actions, -and unlike a lot of other functionality in Content Services, they do not use web scripts to implement their +In many extension projects you want to customize the Document Library in Alfresco Share. And quite often this involves +adding new actions that can be applied to the content in the library. These actions are referred to as "DocLib" actions, +and unlike a lot of other functionality in Content Services, they do not use web scripts to implement their business logic, at least not directly, instead they hook into custom, or out-of-the-box, client-side JavaScript code. -Each action has a 16x16 icon, one or more text labels, and configuration to hook them into the Share application. Most -actions by their nature do something, and it’s likely that they will make a call back to the repository to perform their +Each action has a 16x16 icon, one or more text labels, and configuration to hook them into the Share application. Most +actions by their nature do something, and it’s likely that they will make a call back to the repository to perform their work, which may require a custom repository Action or a custom repository web script. -This tutorial will demonstrate how to add a DocLib action that can be used to send documents as attachments in an email. -The "Send-as-Email" action will be available for documents in Browse view and Details view. The implementation of this -action will make use of a form to collect the email data, such as where to send the email, subject, etc. The email will +This tutorial will demonstrate how to add a DocLib action that can be used to send documents as attachments in an email. +The "Send-as-Email" action will be available for documents in Browse view and Details view. The implementation of this +action will make use of a form to collect the email data, such as where to send the email, subject, etc. The email will be sent by a custom repository Action that is invoked by an out-of-the-box JavaScript function. -The tutorial will also show how a web script can be called from a DocLib action in a an easy way. And finally we will +The tutorial will also show how a web script can be called from a DocLib action in a an easy way. And finally we will look at how to create an action that displays an external Web page. **Implementation Steps**: -Adding a new DocLib action to the Document Library involves the following steps: +Adding a new DocLib action to the Document Library involves the following steps: 1. Configure the action so it is known to Share (typically in a Surf Extension Module) 2. Configure where the action should be visible (typically in a Surf Extension Module) @@ -40,19 +40,19 @@ Adding a new DocLib action to the Document Library involves the following steps: 7. Implement custom client side JavaScript code that should be called when action is invoked, or use one of the out-of-the-box JavaScript functions (e.g. `onActionFormDialog` - displays a form and then calls a Repo Action, `onActionSimpleRepoAction` - calls a Repo Action) 8. (Optionally) Implement any repository Action or repository web script that should be invoked by the action -As we can see, implementing a DocLib action can involve quite a few steps and take some time. However, it can also be +As we can see, implementing a DocLib action can involve quite a few steps and take some time. However, it can also be very simple as we will see with our DocLib action example that navigates to the Google search home page. **Related Information**: -This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it -[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself with how +This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it +[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself with how [Surf Extension Modules]({% link content-services/latest/develop/share-ext-points/surf-extension-modules.md %}) work as we will be creating one of those. **Source Code**: [Go to code](https://github.com/Alfresco/alfresco-sdk-samples/tree/alfresco-51/all-in-one/add-action-doclib-share){:target="_blank"} -This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) -project. To try out the Send-As-Email DocLib action in this tutorial you will need to install a local SMTP server such +This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) +project. To try out the Send-As-Email DocLib action in this tutorial you will need to install a local SMTP server such as [Fake SMTP](https://nilhcem.github.io/FakeSMTP){:target="_blank"}. This tutorial will demonstrate the following: @@ -86,20 +86,20 @@ Tutorial implementation steps: ${alfresco.share.version} amp - + ${project.groupId} aio-platform-jar ${project.version} - + ${project.groupId} add-action-repo ${project.version} - + ${project.groupId} @@ -115,19 +115,19 @@ Tutorial implementation steps: ```java public class SendAsEmailActionExecuter extends ActionExecuterAbstractBase { private static Log logger = LogFactory.getLog(SendAsEmailActionExecuter.class); - + public static final String PARAM_EMAIL_TO_NAME = "to"; public static final String PARAM_EMAIL_SUBJECT_NAME = "subject"; public static final String PARAM_EMAIL_BODY_NAME = "body_text"; - + ... - + @Override protected void addParameterDefinitions(List paramList) { for (String s : new String[]{PARAM_EMAIL_TO_NAME, PARAM_EMAIL_SUBJECT_NAME, PARAM_EMAIL_BODY_NAME}) { paramList.add(new ParameterDefinitionImpl(s, DataTypeDefinition.TEXT, true, getParamDisplayLabel(s))); } - } + } ``` Our Send-As-Email DocLib action will collect the values for these three parameters via a form. @@ -137,7 +137,7 @@ Tutorial implementation steps: After downloading the FakeSMTP server, see link in the beginning of this tutorial, unpack and then start it with the following command: ```bash - martin@gravitonian:~/apps/fakeSMTP$ java -jar fakeSMTP-1.13.jar -s -p 2525 + martin@gravitonian:~/apps/fakeSMTP$ java -jar fakeSMTP-1.13.jar -s -p 2525 ``` It should start up immediately and listen on port 2525, you should see a UI that will display any incoming emails. @@ -178,7 +178,7 @@ Tutorial implementation steps: -
+ ``` The different attributes and sub-elements for the `action` element have the following meaning: @@ -196,7 +196,7 @@ Tutorial implementation steps: 1. Display a form where the end-user can type in the values for the email address, email subject, and email body text. 2. When the form is submitted it should automatically call a custom repository action with the information collected via the form. - + We achieve this by using the out-of-the-box JavaScript function called `onActionFormDialog`. The following table explains the parameters used with this function: |Name|Description| @@ -234,7 +234,7 @@ Tutorial implementation steps: ... - + @@ -263,7 +263,7 @@ Tutorial implementation steps: |`folder-link-browse`|Action is visible for links to folders on the Browse page| |`folder-link-details`|Action is visible for link to folder on the Folder Details page| - The `index` argument is specifying the order of this action in the list of actions. The higher the number the lower it will be displayed in the action list. By having a look in the `share-documentlibrary-config.xml` configuration file located in the `alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco` directory of your Content Services 6.2 installation, you can find out that the highest index for `document-browse` actions is 360 and for `document-details` actions 390. So if we set our `index` for the Send-As-Email action to 400 it should end up last in both of these action lists. + The `index` argument is specifying the order of this action in the list of actions. The higher the number the lower it will be displayed in the action list. By having a look in the `share-documentlibrary-config.xml` configuration file located in the `alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco` directory of your Content Services installation, you can find out that the highest index for `document-browse` actions is 360 and for `document-details` actions 390. So if we set our `index` for the Send-As-Email action to 400 it should end up last in both of these action lists. If you want more examples of how Document Library actions can be defined and configured, have a look in the `share-documentlibrary-config.xml` file and the `DocLibActions` section. @@ -280,19 +280,19 @@ Tutorial implementation steps: 1. Configure it with the element in the action configuration (We have already done this) 2. Create a Java class that extends the `org.alfresco.web.evaluator.BaseEvaluator` class 3. Define a spring bean with an id matching the configuration element’s value and then set the class for the Spring bean to the one implemented in step 2 - + Create a new Java class called `CheckIfDocIsEmailedEvaluator` in the `aio/aio-share-jar/src/main/java/org/alfresco/tutorial/doclibaction/evaluator` package (you will have to create the package path). Then implement the Java class like this: ```java package org.alfresco.tutorial.doclibaction.evaluator; - + import org.alfresco.web.evaluator.BaseEvaluator; import org.json.simple.JSONArray; import org.json.simple.JSONObject; - + public class CheckIfDocIsEmailedEvaluator extends BaseEvaluator { private static final String ASPECT_EMAILED = "cm:emailed"; - + @Override public boolean evaluate(JSONObject jsonObject) { try { @@ -338,8 +338,8 @@ Tutorial implementation steps: * Metadata value * Is Browser (type) * Is Portlet mode - - See the `slingshot-documentlibrary-context.xml` file located in the `alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco` directory of your Content Services 6.2 installation for more information about out-of-the-box evaluators. + + See the `slingshot-documentlibrary-context.xml` file located in the `alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco` directory of your Content Services installation for more information about out-of-the-box evaluators. 6. Add a Status Indicator for the Send-As-Email action. @@ -351,7 +351,7 @@ Tutorial implementation steps: 2. Add an `indicator` configuration to the `DocumentLibrary` section configuration 3. Add i18n label to the resource property file 4. Add an image to be used as indicator to the `components/documentlibrary/indicators` directory - + The `indicator` configuration is also done in the `add-doclib-actions-extension-modules.xml` file and points to the evaluator previously implemented. It looks like this in the new `DocumentLibrary` section: ```xml @@ -372,11 +372,11 @@ Tutorial implementation steps:
- + ... - + @@ -418,11 +418,11 @@ Tutorial implementation steps: ... - + - ... + ... - + @@ -442,7 +442,7 @@ Tutorial implementation steps: - + @@ -517,7 +517,7 @@ Tutorial implementation steps: - + ``` This action is also of type `javascript` in the same way the Send-As-Email action was. However, this action will call a custom JavaScript function called `onActionCallWebScript`. The `callws-16.png` icon for this action should already be available if you implemented the Send-As-Email action above. @@ -548,7 +548,7 @@ Tutorial implementation steps: ... - + ... @@ -582,7 +582,7 @@ Tutorial implementation steps: fn: function org_alfresco_training_onActionCallWebScript(file) { this.modules.actions.genericAction( { - + success: { callback: { fn: function org_alfresco_training_onActionCallWebScriptSuccess(response) { @@ -605,7 +605,7 @@ Tutorial implementation steps: } }] }); - + }, scope: this } @@ -704,12 +704,12 @@ Tutorial implementation steps: ```javascript var nodeRef = args["nodeRef"]; var fileNode = search.findNode(nodeRef); - + model["name"] = fileNode.name; model["creator"] = fileNode.properties.creator; model["createdDate"] = fileNode.properties.created; model["modifier"] = fileNode.properties.modifier; - model["modifiedDate"] = fileNode.properties.modified; + model["modifiedDate"] = fileNode.properties.modified; ``` Finally add the template file called `file-info.get.json.ftl`: @@ -771,7 +771,7 @@ Tutorial implementation steps: - + ``` This action is also of type `javascript` in the same way the previous actions have been.This action will call a custom JavaScript function called `onShowCustomMessage`. The `showmsg-16.png` icon for this action should already be available if you implemented the Send-As-Email action above. @@ -801,7 +801,7 @@ Tutorial implementation steps: ... - + ... @@ -838,7 +838,7 @@ Tutorial implementation steps: }); } }); - + YAHOO.Bubbling.fire("registerAction", { actionName: "onActionCallWebScript", @@ -850,7 +850,7 @@ Tutorial implementation steps: The only thing we do in this action code is to display a message with the help of the `Alfresco.util.PopupManager.displayMessage` function. 5. The implementation of the Show-Custom-Message DocLib action is now complete. This is probably the smallest DocLib action backed by JavaScript code that you might come across. To try it out build and start the application server as follows: - + ```bash /all-in-one$ ./run.sh build_start ``` @@ -896,7 +896,7 @@ Tutorial implementation steps: - + ``` The `google-16.png` icon for this action should already be available if you implemented the Send-As-Email action above. @@ -925,7 +925,7 @@ Tutorial implementation steps: ... - + ... @@ -966,12 +966,12 @@ Tutorial implementation steps: **Description**: -When custom content models are deployed to the repository it is sometimes a requirement to display properties from these -in the Document Library Browse view. This can be done with so called Metadata Templates, which are tied to an evaluator +When custom content models are deployed to the repository it is sometimes a requirement to display properties from these +in the Document Library Browse view. This can be done with so called Metadata Templates, which are tied to an evaluator that decides if the template is applicable or not to the content item in question, such as a folder or a file. -If there is no specific Metadata Template defined for a content item type then it falls back on a `default` Metadata -template that looks like this (all out-of-the-box Metadata Templates can be found in +If there is no specific Metadata Template defined for a content item type then it falls back on a `default` Metadata +template that looks like this (all out-of-the-box Metadata Templates can be found in `alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml`): ```xml @@ -984,24 +984,24 @@ template that looks like this (all out-of-the-box Metadata Templates can be foun {tags} {categories} {social} - + ``` This template gives you the basic information for the node, such is in the following example for a file: ![dev-extensions-share-tutorials-custom-metadata-template-doclib-default]({% link content-services/images/dev-extensions-share-tutorials-custom-metadata-template-doclib-default.png %}) -This tutorial will demonstrate how to add a custom DocLib Metadata Template for a custom type from a content model that -comes with the SDK Samples. This content model has a type called `acme:document` that contains a property called -`acme:documentId` (for more info see `aio/aio-platform-jar/src/main/resources/alfresco/module/aio-platform-jar/model/content-model.xml`). -We will create a new template that displays this custom property. The template will be based on the `default` template +This tutorial will demonstrate how to add a custom DocLib Metadata Template for a custom type from a content model that +comes with the SDK Samples. This content model has a type called `acme:document` that contains a property called +`acme:documentId` (for more info see `aio/aio-platform-jar/src/main/resources/alfresco/module/aio-platform-jar/model/content-model.xml`). +We will create a new template that displays this custom property. The template will be based on the `default` template that you can see above and the property will use the default presentation rendering. The tutorial will also show how you can render a property in a custom way in your Metadata template. **Implementation Steps**: -Adding a new Metadata Template to the Document Library involves the following steps: +Adding a new Metadata Template to the Document Library involves the following steps: 1. Configure the template so it is known to Share (typically in a Surf Extension Module) 2. Add an evaluator that controls for what content nodes (i.e. file, folder, etc.) the template is applicable @@ -1010,14 +1010,14 @@ Adding a new Metadata Template to the Document Library involves the following st **Related Information**: -This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it -[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself with how +This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it +[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself with how [Surf Extension Modules]({% link content-services/latest/develop/share-ext-points/surf-extension-modules.md %}) work as we will be creating one of those. **Source Code**: [Go to code](https://github.com/Alfresco/alfresco-sdk-samples/tree/alfresco-51/all-in-one/add-metadata-template-doclib-share){:target="_blank"} -This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) -project. +This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) +project. This tutorial will demonstrate the following: @@ -1062,7 +1062,7 @@ Tutorial implementation steps: - + ``` What we have done here is basically copied the metadata template with the identifier ` - + @@ -1187,7 +1187,7 @@ Tutorial implementation steps: - + ``` Here we have added an extra `line` identified with the `id="acmeDocIdCustom"` that will represent the custom rendered document identifier. The custom rendering will be done via some client side JavaScript code that is going to be associated with the `line` via the property name `acmeDocumentIdCustomRendition`. The custom JavaScript code will be loaded via the above `DocLibCustom` definition that loads a new JavaScript file called `custom-metadata-template-renderer.js`. This file needs to be created next. @@ -1207,7 +1207,7 @@ Tutorial implementation steps: html = ""; var acmeDocId = properties["acme:documentId"] || ""; html = '' + label + '

' + acmeDocId + '

'; - + return html; } }); @@ -1232,12 +1232,12 @@ Tutorial implementation steps: **Description**: -This tutorial demonstrates how to add a new menu item called **Create an Acme Text Document** to the **Create...** menu -that is available in the browse view in the Document Library. When the new menu item is selected it will prompt the user -for document name, title, description, and text content. When the user clicks **Create** to create the document it will -be created with a custom type set. Because the document is created with a custom type we also need to configure a -"create" form for this type, which this tutorial shows how to do. The general take away from this tutorial is that most -of the configuration that is normally done in the `share-config-custom.xml` file can also be done with +This tutorial demonstrates how to add a new menu item called **Create an Acme Text Document** to the **Create...** menu +that is available in the browse view in the Document Library. When the new menu item is selected it will prompt the user +for document name, title, description, and text content. When the user clicks **Create** to create the document it will +be created with a custom type set. Because the document is created with a custom type we also need to configure a +"create" form for this type, which this tutorial shows how to do. The general take away from this tutorial is that most +of the configuration that is normally done in the `share-config-custom.xml` file can also be done with Surf Extension Modules, which makes it possible to enable and disable the configuration at runtime. **Implementation Steps**: @@ -1251,17 +1251,17 @@ Adding a new content create item in the Document Library usually involves the fo **Related Information**: -This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it -[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) -before starting this tutorial. Also, familiar yourself with how you can create a text document via the +This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it read up on it +[here]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) +before starting this tutorial. Also, familiar yourself with how you can create a text document via the **Create... > Plain Text...** menu item as it is similar to what we are going to do in this tutorial. **Source Code**: [Go to code](https://github.com/Alfresco/alfresco-sdk-samples/tree/alfresco-51/all-in-one/add-create-menuitem-doclib-share){:target="_blank"} -This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) project. +This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) project. -Sometimes when you have a custom content model it is useful to be able to create new documents with a custom type set -automatically, and at the same time also collect values for the type's custom properties. All directly from the Share +Sometimes when you have a custom content model it is useful to be able to create new documents with a custom type set +automatically, and at the same time also collect values for the type's custom properties. All directly from the Share user interface. This can be done by adding menu items to the **Create...** menu in the Document Library. Tutorial implementation steps: @@ -1275,12 +1275,12 @@ Tutorial implementation steps: ```xml - + Document Model for the fictional company Acme James Alfresco 1.0 - + @@ -1289,12 +1289,12 @@ Tutorial implementation steps: - + - + @@ -1312,7 +1312,7 @@ Tutorial implementation steps: - + ... @@ -1338,7 +1338,7 @@ Tutorial implementation steps:
- +
@@ -1408,7 +1408,7 @@ Tutorial implementation steps: It is also possible to skip these resource label properties all together, and just type in the label directly in the create action definition, if for example the system should only support English: ```xml - + ``` 4. The implementation of this sample is now done, build and start the application server as follows: @@ -1457,19 +1457,19 @@ Tutorial implementation steps: **Description**: -This tutorial demonstrates how to customize an existing Surf JavaScript Widget by extending the out-of-the-box -Documentlist widget so it shows a message every time a filter is changed. In previous versions of Content Services -it was only possible to customize JavaScript widgets by copying existing code, modifying it, and then copying it onto -the web extensions path. This was not efficient as it created a maintenance burden as the code needed to be managed +This tutorial demonstrates how to customize an existing Surf JavaScript Widget by extending the out-of-the-box +Documentlist widget so it shows a message every time a filter is changed. In previous versions of Content Services +it was only possible to customize JavaScript widgets by copying existing code, modifying it, and then copying it onto +the web extensions path. This was not efficient as it created a maintenance burden as the code needed to be managed through changes to the original widget. -Now logic and metadata about widget instantiation has been moved from the FreeMarker templates and moved into the -JavaScript controller as this is easier to customize. The metadata is stored as a standardized object structure in the -model, which is then processed by a new custom directive in the FreeMarker template to output the JavaScript code +Now logic and metadata about widget instantiation has been moved from the FreeMarker templates and moved into the +JavaScript controller as this is easier to customize. The metadata is stored as a standardized object structure in the +model, which is then processed by a new custom directive in the FreeMarker template to output the JavaScript code necessary to instantiate the specified widgets. -Existing JavaScript controller extension capabilities can be used so that -[Surf Extension Modules]({% link content-services/latest/develop/share-ext-points/surf-extension-modules.md %}) +Existing JavaScript controller extension capabilities can be used so that +[Surf Extension Modules]({% link content-services/latest/develop/share-ext-points/surf-extension-modules.md %}) can modify the default metadata object(s) to change the following: * The name of the JavaScript widget to be instantiated @@ -1479,12 +1479,12 @@ can modify the default metadata object(s) to change the following: * Whether or not additional options are applied to the widget * The additional options that should be applied to the widget -FreeMarker templates use a common “boiler-plate” structure to ensure consistency across web script rendered components. -Updated resource handling features in Surf are used to move all the CSS and JavaScript dependency requests into the -template and remove the associated *.head.ftl file. A consistent pattern of `<@markup>` directives is used throughout +FreeMarker templates use a common “boiler-plate” structure to ensure consistency across web script rendered components. +Updated resource handling features in Surf are used to move all the CSS and JavaScript dependency requests into the +template and remove the associated *.head.ftl file. A consistent pattern of `<@markup>` directives is used throughout the template to further enhance customization options. -The general take away from this tutorial is that most JavaScript Widget customizations that was previously done by +The general take away from this tutorial is that most JavaScript Widget customizations that was previously done by changing out-of-the-box JavaScript code, can now be done via Surf Extension Modules and JavaScript object extensions. **Implementation Steps**: @@ -1499,9 +1499,9 @@ Customizing the Documentlist Widget in the Document Library involves the followi **Related Information**: -This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it, -see [Share Document Library]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself -with how you can switch between different filters in the Document Library (that is, the navigation menu to the left in +This tutorial assumes that you are familiar with the Document Library in Share. If you are new to it, +see [Share Document Library]({% link content-services/latest/develop/share-ext-points/share-config.md %}#sharedoclib) before starting this tutorial. Also, familiar yourself +with how you can switch between different filters in the Document Library (that is, the navigation menu to the left in the DocLib). This tutorial assumes you have created a new [SDK All-In-One]({% link content-services/latest/develop/sdk.md %}#workingaio) project. @@ -1522,7 +1522,7 @@ Tutorial implementation steps: org.alfresco.tutorials.customization - + ``` 3. Create the following directory: `aio/aio-share-jar/src/main/resources/META-INF/resources/aio-share-jar/doclib/extension`. @@ -1541,7 +1541,7 @@ Tutorial implementation steps: Tutorials.custom.DocumentList.superclass.constructor.call(this, htmlId); return this; }; - + // Extend default DocumentList YAHOO.extend(Tutorials.custom.DocumentList, Alfresco.DocumentList, { @@ -1549,14 +1549,14 @@ Tutorial implementation steps: { // Call super class method Tutorials.custom.DocumentList.superclass.onFilterChanged.call(this, layer,args); - + // Pop-up a message Alfresco.util.PopupManager.displayMessage({ text: "Filter Changed!" }); } }); - })(); + })(); ``` 5. Create the following directory: `aio/aio-share-jar/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/tutorials/customization`. @@ -1566,7 +1566,7 @@ Tutorial implementation steps: ```text <@markup id="custom-documentlist-dependencies" target="js" action="after" scope="global"> <@script src="${url.context}/res/doclib/extension/custom-documentlist.js" group="documentlibrary"/> - + ``` This loads our custom JavaScript widget class after the out-of-the-box JavaScript files used by the Document List widget.