Alfresco, a major player in the open source enterprise content management market has introduced Alfresco Migration Services to simplify content migration from costly legacy and proprietary solutions to Alfresco ECM.
This solution will enable organizations to decrease their ECM costs in an increasingly commoditized market.
Alfresco Migration Services will be made available for a variety of legacy and proprietary ECM solutions. The services will initially be offered for organizations seeking to migrate from EMC Documentum and Microsoft SharePoint to Alfresco Enterprise.
The migration process is designed to handle all the content transfers, ensuring all content and critical metadata are transferred safely, including:
Reasons for Migration: -
Migration Challenges:-
Migration Strategy:-
Alfresco the open platform for social content management launches the Alfresco Community 4, the most significant release of the platform to date. Alfresco open source 4 highlights, a wealth of new user features and UI enhancements that enable faster user adoption, along with improved tools to allow developers to create social and cloud-scale, content-rich applications. They also separated their content indexing processes from content management and replaced this functionality with their own indexing solution. Alfresco Community 4 significantly increases overall system performance.
Alfresco 4 also includes functions to publish content and status updates to social sites, such as YouTube, Facebook, LinkedIn, Twitter, Flickr and SlideShare which will be a welcome addition to users as the use of public social media rises. Other new features for cloud-scale performance, open platform for social channel publishing and user experience include:
High-performance Indexing: The New Alfresco Index Server that is based on Apache Solr extensively improves the performance by separating indexing from content processes.
Integrated workflow: It includes the automation of content-focused business processes with Activiti, which is the leading open source Java-based BPMN 2.0 business process server.
Enhanced clustering: This feature is being introduced to increase the reliability and scalability, including added support for clustered CIFS.
Simpler Process: Social content publishing, part of an enterprise content workflow, simplifies to much an extent the problem of multi-channel publishing. It also control publishing with existing review and approve workflows along with built-in content security.
Fewer Tools leads to lesser errors: This feature offers embedded social publishing into an organization’s core content and collaboration tool, which eliminates the need for social-specific tools and error-prone “copy-and-paste” to external tools.
Drag and Drop Simplicity: Drag and drop streamlines the movement of files around on HTML5 enabled browsers.
Additional support for audio, video, Adobe Creative Suite & Apple iWork documents: The support delivers inline preview and metadata extraction for more file types.
Social Features: The new added social features on Alfresco 4 enables to ‘Follow’ influential content creators as well as ‘liking’ the favorite content.
Cloud Collaboration: This includes Google Docs integration to collaborate in real time.
Mobile Support: The mobile support offers new, free iOS apps available from iTunes, along with continued support for WebDAV and CMIS standards for new mobile use cases.
Extensibility: For developers and partners, Alfresco web interface is now much easier to extend and customize.
Alfresco Community edition 4 is available for download from Alfresco’s website.
While working on Alfresco, we have been asked several times by our customers about different User Roles in Alfresco and their permissions. The table below will describe each actions available for different User Roles:
| For File | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| For Folder | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Steps to follow to display custom properties on edit properties page:
1. To display custom properties on edit properties page web-client-config-properties file required to be modified which is located at –
ALFRESCO_TOMCAT_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config-properties.
2. New condition evaluator is required to be defined in this file. For example look at the following code snippets :
<config evaluator=“aspect-name” condition=“algocustompayment”>
<property-sheet>
<show-property name=“algopayment” />
</property-sheet>
</config>
3. The config tag has two attribute evaluator and condition. In this example evaluator attribute tells the alfresco system to display custom properties when name of the aspect is equal is to value defined in condition attribute.
4. Each config tag has <property-sheet> child tag which adds the properties declared in the <show-property> tag to list of properties displayed in edit properties screen.
Note: Only those properties will be displayed as fields in the edit properties screen which are declared in <show-property> tags. It is also mandatory to set a rule on a folder to apply the “algocustompayment” aspect on each document to be uploaded in that folder.
5.For each new aspect defined in defaultCustomModel.xml , a <config> condition evaluator is mandatory to be defined in web-client-config-properties.xml whenever properties associated with the aspect are required to be displayed on edit properties screen.
Following are the steps you need to follow to setup email in your Java-backed webscript:
Step 1: In file [ALFRESCO_HOME]/tomcat/shared/classes/alfresco-global.properties, change default “Outbound Email Configuration” setting to the following:
# SMTP Host
mail.host=smtp.yourhost.com
# SMTP Port
mail.port=25
# Username and password to access your SMTP Server
mail.username=user@yourhost.com
mail.password=password
mail.encoding=UTF-8
mail.protocol=smtp
# Default from-email-id, this email-id must be a valid email-id on the provided SMTP server
mail.from.default=user@yourhost.com
mail.smtps.starttls.enable=true
mail.smtp.auth=true
Step 2: Create your webscript at [ALFRESCO_HOME]/ tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/com/sample/
Configuration file: Support the configuration file name of the webscript is send-mail.post.desc.xml, and url is something like <url>/sample/send-mail</url>
Response file: send-mail.post.json.ftl
Java file: SendMail.java -
private JavaMailSender javaMailSender; //declare as the instance variable, its setter & getter are as follows
/**
* @return the javaMailSender
*/
public JavaMailSender getJavaMailSender() {
return javaMailSender;
}
/**
* @param javaMailSender the javaMailSender to set
*/
public void setMailService(JavaMailSender javaMailSender) {
this.javaMailSender = javaMailSender;
}
Put following line of code into doWork method of executeImpl of your webscript java file:
SimpleMailMessage simpleMailMessage = new SimpleMailMessage();
simpleMailMessage.setTo(toEmailId); //is the address of receiver
simpleMailMessage.setSubject(subject); //is the subject of email
simpleMailMessage.setText(message); //is the body of email
simpleMailMessage.setFrom(fromEmailId); //is the address of sender
simpleMailMessage.setReplyTo(replyEmailId); //is the address of user to whom receiver need to reply
simpleMailMessage.setSentDate(new Date());
javaMailSender.send(simpleMailMessage); //this will send the email
Note: fromEmailId must be a valid email id on the SMTP server.
Step 3: Compile your java file through ant. Create the jar file and put it into [ALFRESCO_HOME]/ tomcat/webapps/alfresco/WEB-INF/lib folder.
Step 4: Register the Webscript bean (which must look like given below) in file [ALFRESCO_HOME]/ tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-scripts-application-context.xml
<bean id=”webscript.com.sample.send-mail.post” class=”com.sample.SendMail” parent=”webscript”>
<property name=”serviceRegistry” ref=”ServiceRegistry” />
<property name=”mailService” ref=”mailService” />
</bean>
Step 5: Start alfresco’s tomcat and have fun
We have tried to analyze the document management capabilities to be integrated in a Java web application. If you are using Liferay, it already has a document management portlet which has most of the basic capabilities. However Alfresco DMS is just great, but it requires integration effort if Liferay is necessary to be used as a front-end to support JSR168. Following are the points to give a must thought to using Alfresco.
1. Alfresco has very strong support for complex workflow
2. Rules in Alfresco can be created on folders for documents event or based on metadata type
3. Alfresco supports document versioning and document can be reverted to previous version
4. Liferay has no notification from document library updates
5. Liferay WebDAV functionality is broken
6. No discussion on documents in Liferay document library. Liferay does have comments facility to a document though.
7. Liferay Portal and its portlets use Lucene to provide full text searching capabilities. Liferay lucene indexing is not optimized and some of the case expected result is not returned.
8. Liferay document library is highly unstable and has lots of issues open on JIRA.
The above points are our initial analysis, so few changes or additions can be expected later as we analyze further.
Follow the steps below to display custom properties on advanced search screen:
1. The property which needs to be displayed on advanced search page requires modification in web-client-config.xml which is located at - ALFRESCO_TOMCAT_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.xml.
2. Locate following condition evaluator in web-client-config.xml -
<config evaluator=”string-compare” condition=”Advanced Search”>
3. Advanced search condition evaluator has <advanced-search> child tag which has <custom-properties> child tag.
4. <custom-properties> child tag is used to define custom properties which get displayed on advanced search screen. For example look at the following code snippet:
<meta-data aspect=”cm:algocustompayment” property=”cm:algopayment” />
Click here to view how custom aspect “cm:algocustompayment” and its properties can be created.
5. <meta-data> tag has two attribute aspect and property.
6. The aspect attribute of <meta-data> tag declares the name of the aspect which will appear in drop down on advanced search page. The text in the drop-down to be displayed will be fetched from the “title” tag defined for the aspect in defaultCustomModel.xml.
7. The property attribute of <meta-data> tag declares the property of the aspect which will appear in list of search fields.
NOTE: In this case value of the aspect is “cm:algocustompayment” which will add the human readable name of aspects e.g. “Payment Aspect” to drop down and value of property is “cm:algopayment” which will display the human readable name in search field i.e. “Payment Amount”.
Please follow the steps below to create new aspects in Alfresco:
1. New aspects can be defined in defaultCustomModel.xml file located at ALFRESCO_TOMCAT_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/model/defaultCustomModel.xml.
2. Find <aspects> tag in defaultCustomModel.xml file. There is only one <aspects> tag and <aspects> tag can contain multiple <aspect> tag.
3. Each <aspect> tag defines a new custom aspect. For example look at the following code snippets:
<aspect name=”cm:algocustompayment”>
<title>Payment Aspect</title>
<properties>
<property name=”cm:algopayment”>
<title>Payment Amount</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled=”true”>
<atomic>true</atomic>
<stored>true</stored>
<tokenised>true</tokenised>
</index>
</property>
</properties>
</aspect>
4. Each <aspect> tag has name attribute which is the name of the aspects.
5. Each <aspect> tag has <title> tag which is the human readable name of the aspect.
6. Each <aspect> tag has <properties> tag which defines the properties associated with that aspect.
7. Each <properties> tag can have multiple <property> tag. Each <property> tag defines a property associated with that aspect.
8. Each <property> tag has mandatory name attribute which defines the name of the property used within alfresco system to identify the property.
9. Each <property> tag has mandatory <title> child tag which is human readable name of the property.
10. Each <property> tag has <type> child tag which is used to define type of the property. The acceptable values are d:any, d:text, d:mltext, d:content, d:int, d:long, d:float, d:double, d:date, d:datetime, d:boolean, d:qname, d:noderef, d:childassocref, d:assocref, d:path, d:category, d:locale, d:version.
11. Each <property> tag has <mandatory> child tag which defines whether this property is mandatory or not. Acceptable values are true and false.
12. Each <property> tag has <index> tag which defines whether this property should be indexed by lucene or not.
Problem comes when you want to use rendered, actionListener and action attributes of < a:actionLink> with variable ‘r’.
Actually the problem is not of < a:actionLink> or of ‘r’ value but of the working process of jsf framework itself.
After rendered, JSF again checks the ‘r’ value and call for the action. And at that time it does not find the value of ‘r’ so fails to perform the action means ‘r’ is not available.
Solution:
To solve this problem you can wrap the < a:actionLink> with < a:booleanEvaluator> tag
and then there is no need to use rendered in < a:actionLink> because the condition can be checked in < a:booleanEvaluator>.
Sample code looks like this:-
< a:booleanEvaluator value=”#{r.myVariable == true/false}” id=”some-id”>
< a:actionLink value=”" id=”newid” image=”someImage.gif” action=”dialog:MyDialog” actionListener=”#{MyDialog.anyAction}” tooltip=”tooltip” showLink=”false”>
< f:param name=”paramName” value=”#{r.paramValue}”/>
< /a:actionLink>
< /a:booleanEvaluator>
Keep AlgoBlogging!!!
Scenario: you need to find noderef of a folder which contains a document of given node id
Solution:
1. First create the NodeRef for the given node id.
StoreRef storeRef = Repository.getStoreRef();
NodeRef documentNodeRef = new NodeRef(storeRef, documentId);Where documentId is the Node Id for which you are trying to get the parent folder NodeRef.
2. Now you would need to take help of “NodeService” to get the parent folder NodeRef. Suppose you have NodeService available in your bean (you can always get the NodeService from getNodeService() method of ServiceRegistry OR get if from session):
ChildAssociationRef childAssociationRef = this.nodeService.getPrimaryParent(documentNodeRef);
NodeRef documentParentNodeRef = childAssociationRef.getParentRef();
documentParentNodeRef is what you were looking for
Happy AlgoBlogging!!!