Video of the Content Model Editor
Hello again,
ive created a small video which shows in short time how the content model editor works.
In this video i present following doing:
- create a new property costCenter and assign this property to an existing document type (it-novum)
- save & deploy it on the live system without restart
- add content and change the type to the responsible document type (it-novum)
Voila!
Important tip: You should click on the lower right button in the video to maximize the video
Unable to display content. Adobe Flash is required.
Content Model Editor for Alfresco Share
Daily business changes our workflow rapidly - intern as well as for customers and enterprise-partners. All depended systems which will be affected on those changes must apply very fast on it. Furthermore to transform such changes into a DMS, the model-data must often be extended and must be able to handle those changes very quickly. Also the possibility for workshops to create more similarity between a a (potential) customer and Alfresco should be established through this editor. To point out this, it should be understandable for the middle- and high-level manager how to solve problems with Alfresco to engage those persons better for Alfresco.
The Model Editor is well integrated in Alfresco Share and can be accessed through the admin-console. The editor makes you comfortable to create very easily your datatypes and aspects. Through separated panels, properties and associations can be created and defined based on customers real requirements – live. Secondly you can assign those elements on datatypes and aspects. After all you can decide if you want to change the whole way on how the metadate should be visible to the user in Alfresco Share. Alfresco-Explorer config is also being created as well. After saving your model you are able to deploy it directly in Alfresco without any restart. After deploying you can take use of your new model. For instance, you are able to create a new document based on your datatype or to search for it using extend search which is configured for your datatypes as well. Also it is even possible to create you workflow-model as it is based on the “standard-model” as like others.
Based on the Alfresco 3.0 feature “Dynamic Models” the editor is able to handle just-in-time deployments. All data that can be modified in the Editor is stored by XStream so we can easily handle this complex-data format. It was a big struggling to get the best UI-Concept which can be used with Alfresco Share. We extended some Drag & Drop functionality based on Alfresco Share to create a unique UI-Expierience.
Liferay and CMIS against Alfresco
At first, im sorry about my lately post against CMIS and Liferay against Alfresco … But there was an “earthquake around here” so i couldnt do anything good the last time. I will explain that you later if the time comes …
But in the meanwhile i looked around the Net and i found an interesting article about this: http://www.liferay.com/web/alexander.chow/blog/-/blogs/7670631
If you have read the text some points we should disucuss in the text next time:
- How is Authentication being managed between Alfresco & Liferay if i using NTLM or other SSO-Parties?
- What about Aspects? Because in Liferay you can managed custom metadata. In Alfresco you have do define your model and deploy it against the dictionary. Aspects will be considered lunch off in CMIS 1.1
So i think if you looking for a small budget integration between those both applications you should consider using Liferay 6.1 for take the risk!
Critical Liferay Security Issue: User is logged in as another user
Today my customer came to me with a critical issue: more than one user are logged in as another user after login. This issue belongs to at least Liferay 6 SP 1 . Ive tested it with LDAP and NTLM but it could not work for basic-auth as well.
For instance: if you have users with username lwescmo and lwesco1 you expect such a result.
To reproduce it, you have at first to process a login with the first user named lwescmo. After that, process a logout and try to login with the second one named lwesco1.
As you can see, the user is in the scope of lwescmo and NOT lwesco1.
Reason: If a user is logged in, the complete userobject will be cached (in the Finder-Cache). Therefore the FinderCacheImpl is creating a hashkey for each finder-entry using finderPath.encodeCacheKey(args). Through this, for both user the same key will be created (for me: 29e1914a).
Both users targeting one cache-entry!
TEMPORARY-SOLUTION: set value.object.finder.cache.enabled to false in your portal-ext.properties and restart your server
Liferay 6.1 CE released - A first brief review!
Its a new year for a new chance to get better in all that things we failed or where we couldn´t gettin better in the past time.
This belongs not only to us but also to our near business partners as well. As that said Liferay does worked out my new-year-call in a pretty short time with Liferay 6.1 CE which has been released recently.
Are you still on Liferay 6.X or lower? Lets migrate your solutions for your customers on sunday to Liferay 6.1 because there are many fancy things around there… i smell something good here and i guess this has something todo with Liferay.
Notice: the next week i will create a review about the CMIS-Interface of Liferay 6.1. I will test it against Alfresco! Stay tuned!
At a glance - all is gettin good - at least at the very end. Until then we see how we can make better our current situation.
In Advance: Many “small” killer changes!
Firstly, if you start Liferay at the very first time you have to talk with Liferay about your taste regarding initial portal-settings which will be stored in a separated file called wizard.properties. Some initial properties like portals-name can be passed on it here.
If you have reached the main page you see at a glance that the UI has been slightly enhanced and looks more clearly since 6.0. If you going through the dockbar-actions on the top you might imagine some new actions right there.
Especilly the control-panel (the action has been moved to the “Go To” actions) has been completely refined. Many “small eyes changes”(which were surely big in their development) have been done. For instance, the Social Equity feature says more clearly what settings we can change here and which consequenes collaboration-actions can have on user-listings (Top Users Dashlet, Ranking etc.).
A new nice feature is the ability to get a first imaginatine on how REST-Services can be called. Therfore Liferay introduces a developer-page where you can see and test REST-Services directly in the browser.
Do Document-Management, hurry up!
As im a longterm ECM-Specialist my personal passion belongs to document-mangement. I just loving to increase productivity, lower overhead on customersite. Now you are able to perform better document-management practices with Liferay. You are now able to create custom datatypes with custom metadata. Your metadata can have text, date, number, associations as attributes with multilanguage support - its just the Liferay-Way! ![]()
Look at the first picture. Ive created my own datatype called “Offer” with my own attributes. On applying this documenttype on a new document you can see in the image how it feels like: ![]()
As you can see - a webpreview will be created as well. Do you want any more for Liferay 6.1?
Notice: the next week i will create a review about the CMIS-Interface. I will test it against Alfresco! Stay tuned!
Yet Another Alfresco-Liferay Integration
If you look around the market and communities which goes about Alfresco & Liferay you see a lots of posts & contributions regard integration. Yes, yes you might think what the hell is so impressive to have available on liferay-site a document-library of an ECM-System and on the other site you have an ECM-System which helds the data of content.
When we read about integration on newspapers, magazines, articles you probably come to conclusion that may Alfresco or Liferay is being handled as the “only-one-decision-and-devide” where the main controls goes about it. Is Liferay the leading-system which triggers permissions and other Stuff into Alfresco or Liferay? Call yourself!
Well mostly the easist (and mostly the unsilliest) decision is that Alfresco is the right System for all of this Stuff. The only thing you might want to reach is that a subset of that is being available in Liferay for management and collaboration. If you want to pull the trigger in Liferay regards Liferay-Permissions on Alfresco Documents / Folders you may get in realy big trouble as Liferay does not realy know about the context-sensitive and transaction-handled data in Alfresco. Please put off you fingers of thoughts like on how to get the REALY BEST of both worlds.
To be honest with you - the most way on using a realy smart integration regarding Alfresco & Liferay is using the Lead-System and turning the most and impressive (user-)functionality into Liferay-Potential. The most impressive thing in Alfresco is DM AND Alfresco Share. Surely there exist more of features like this but you have to mention yourself honestly about the biggest matter right there.
So if we go back to the main topic you might wondering why we talking about that whole stuff here. Well in one of my projects on customer-side there comes a new need about Document-Management. At customers-site, the main efford-we have done until this point was to enable and implement a new strategy regarding portals & intranet so we´ve been introduced Liferay over months. The main-customer (new-) needs was to have a the best open source ECM-System on board and to harnessing the power of Liferay & Alfresco together. I´ve been comfortable with my recommendation to replace the existing document-library portlet in Liferay with Alfresco. But you have think twice about that integration-aproach as for example in Liferay you can use the WCM-Editor to paste a Document (Link) via Liferay-Controls into the content using a document-browser. Futhermore this shall be true for ALL functionalities in Liferay which using document-management features of the standard document-library portlet.
Thats not trivial at all! Please think about the last sentences.
We have following (realy smart) requirements:
- Use Expierience should not be changed from Liferay-Standard / Customers Theme / Custom Look to have the post acceptance
- All DMS Features from other Portlets (Like Wiki, WCM, etc.) shall be able to use documents as well as like liferay-standard it handles
- All documents with all metadata should be manageable with Alfresco-Share without doing something special which breaks the Alfresco user-expierience
- Authentication should be independly work regardless of NTLM-Authenticaton / LDAP or something other special things
- Authorization on docments should be dirctly managed in Alfresco
The only efficent way can be to reroute Liferay-Services to our own custom services which call Alfresco remotelly to catch documents and to perform operations on the content-store.

Web-Preview of Alfresco available under Lifray with that integration
We´ve been done following approach to complete our task:
- Adding a Hook which overrides Document-Library Core-Service actions to our custom implementation class
- Adding Implementation class which performans queries using RivetLogic API towards Alfresco
- Adding custom Authentication to get rid of possible NTLM/LDAP (Password, Challanging, etc.) problematics
- Adding Webpreviewer in Liferay to enhance User-Expierience (you see the document before you have been download it)
- Adding some Business Rules on Alfresco Side to add custom Liferay data on each node
You might asking yourself why we using RivetLogic API instead of using CMIS? Well we´ve done that implementation a year ago. At this time there was no “stable” cmis available (0.7 …). We want to use a stable and fast-learning API to get the turnaround right here.
Yesterday we´ve brought to a new customer our newest release of the integration. The customer is using
- Liferay 6.0 SP1
- Alfresco 3.4.4
It is possible to arrange an backport/forport-process for other versions.
DevCon to be intended to get next level
As the title implies the first statement at all which get you heared if you attend the show in London´s very centre. To be in brief, the main big issue that flys previously around the DevCon was on how to pay the very very expensive prices in London at this time. I got a room which does explode my mine as i saw at the reception my room number - 295 …. but hey it wasnt my room number isnt it - it was the very special price per day, heyha!
Nevertheless we meet a lots of people around there and tried to get a glue what they expect from the DevCon. Indeed our friends from estonia joins us as well to tweak out their Alfresco-Expieriences. It is so impressive how many people does pain their ass as well as like us to get the long road towards London.
To get back to the main issue here - the DevCon - most of all topics goes about the next big release of Alfresco - 4.0. For me as an enterprise developer and member of a platinum-partner it was appealing to see that we get out a more stable enterprise version. We should mention the most big part of it - the SolR-Integration. With this very nice decision to “switch off” lucene 1.4 to SolR i have the opportunity to dynamically scale out the whole indexing and search-process on diferent kind(!) of servers. For instance - i could use 2 separated servers to let them search against the index. On the other side i could have twice more servers which are responsible to index new transactions completely. Afterwards i can merge the new index into my search-cluster, isnt it awesome?
Beneath the SolR-Integration and other things we had expierienced important improvements regarding Alfresco Share on using extension-points to make customizations highly maintenanceable!
To get a conclusion of all (there were a lots of more sessions) my thought is that i can apply to the argument from Jeff Pots that the 4.0 release is the most important release of Alfresco which shows us in which direction Alfresco wants to go
- to the sky or better … getting a level up to being more Enterprise!
Modulizing me! Time to take a deep breath!
Do you remember on Alfresco Labs?
Yes the time was great for renewing Alfresco´s kind of how we want to work with our informations and with our self. Some things we´d expected of that new approach wasn´t that good after some development with that. But most of the essence of that way brought us to new ways on bringing Open Source to companies … and new thoughts.
As with the most new inventions it is esential to get the next glues on how the product can be enhanced and spreaded accross the globe. This means, spreading innovations in an effective way.
Ask yourself:
How do you think how innovative is your mind to bring a very nice product from your it-company to a potential customer?
How do you adpot business to technique and go straight ahead for the next gread successor of your current product-suite built with Alfresco Share?
Can you create in a businesss-oriented way, such as creating a workflow and ONLY a workflow without building cross-cutting-concersn beaneath, ahead or between your existing Alfresco-Share code?
Do you remember old Alfresco Explorers way which we relyed on it in the past?
I guess you probably get a clue which point i want to turn out.
To get the point, we want summarize the current way on how Share can be extended in a component-like-approach.
We can …
1) … extend Share´s configuration on how nodes can be displayed and performed by actions (search, etc.) AND you can have more than one configuration file as you can see here:
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'><beans><!-- Load the datalist form config -->
<bean id="customer.module.model.clientConfig" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register">
<property name="configService" ref="web.config" />
<property name="configs">
<list>
<value>classpath:alfresco/web-extension/customer-module-model-config.xml</value>
</list>
</property>
</bean>
</beans>
Just add you custom alfresco-config file at alfresco/web-extension/.
2) Your presets.xml can be applied like your webscripts through an extension-folder. This approach is well suited for all of your projects BUT without the way we want to talk here AND in the future - the component way. So this is a very disadvantage - we need a better way to add custom code to our project - we need something like connectores / adapters alfresco does not provide. So how can we made presets.xml more component-like? Well Alfresco Share IS ABLE to handle multiple presets.xml, for sure. But for unexpectly reasons we can not use that feature right now in a convinient way. So i want to present you a hack-way to get this component-way to the finish-lane:
<bean id="customer.module.core.initializeBean" class="com.westernacher.wps.alfresco.customer.module.core.PresetManagerBean"></bean>
Now add the following java-code:
package com.westernacher.wps.alfresco.customer.module.core;
import java.lang.reflect.Field;
import java.util.List;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.extensions.surf.PresetsManager;
public class PresetManagerBean implements InitializingBean, ApplicationContextAware{
private ApplicationContext applicationContext;
@Override
public void afterPropertiesSet() throws Exception {
PresetsManager pmb = (PresetsManager)applicationContext.getBean("webframework.presets.manager");
Field filesField = pmb.getClass().getDeclaredField("files");
try {
filesField.setAccessible(true);
List<String> files = (List<String>)filesField.get(pmb);
files.add("presets-customer-module-core.xml");
}
catch(Exception e){
throw new RuntimeException(e);
}
finally {
filesField.setAccessible(false);
}
}
@Override
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
this.applicationContext = applicationContext;
}
}
We just adding our own presets.xml file (”presets-customer-module-core.xml”) through java-reflection. Just place your presets.xml file at alfresco/web-extension and you are on the right way.
3) Adding documentlibrary-actions was made until 3.2R in a realy hardly way - through fancy HTML-anchor semantic. As from Alfresco 3.3 we have an XML-orientied way using the Webscripts-Configuration-Files features (webscriptname.mimetype.config.xml). But like ive already told you, you can have only ONE configuration file. Currently there exists no valid solution for that but i gave you another way to solve that. The stupid think on that is, we realy have to edit one alfresco-webscript file to perform our component-approach. So we gonna start with following file /org/alfresco/components/documentlibrary/include/documentlist.lib.js. Please find the function getActionSets and go to the line where alfresco wants to return the actionSets. Place following code above of that code:
var documentActions = siteDetailsUtils.getDocumentActions();
for(var idx = 0; idx < documentActions.length; idx++){
var documentAction = documentActions[idx];
var myConfig = new XML(documentAction);
for each (var xmlActionSet in myConfig..actionSet)
{
actionSet = [];
actionSetId = xmlActionSet.@id.toString();
prefActionSet = prefActions[actionSetId] || {};
defaultOrder = 100;
//actionSetId can be document, empty ...
logger.getSystem().out("----------------" + actionSetId);
for each (var xmlAction in xmlActionSet..action)
{
defaultOrder++;
actionId = xmlAction.@id.toString();
actionSet.push(
{
order: prefActionSet[actionId] || defaultOrder,
id: actionId,
type: xmlAction.@type.toString(),
permission: xmlAction.@permission.toString(),
href: xmlAction.@href.toString(),
label: xmlAction.@label.toString()
});
logger.getSystem().out("----------------" + actionId);
}
var actions = actionSet.sort(sortByOrder);
for(var k = 0; k < actions.length; k++){
actionSets[actionSetId].push(actions[k]);
}}
}
Next, add the sitedetailsutils through xml so we make available this java-functionality through javascript:
<bean id="customer.module.core.siteDetailsUtils" class="com.westernacher.wps.alfresco.customer.module.core.SiteDetailsUtils" />
<bean id="webscripts.container" parent="webscripts.abstractcontainer" class="org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer">
<property name="name"><value>Spring Surf Container</value></property>
<property name="registry" ref="webscripts.registry" />
<property name="searchPath" ref="webframework.webscripts.searchpath" />
<property name="templateProcessorRegistry" ref="webframework.webscripts.registry.templateprocessor" />
<property name="scriptProcessorRegistry" ref="webframework.webscripts.registry.scriptprocessor" />
<property name="configService" ref="web.config" />
<property name="scriptObjects">
<map merge="true">
<entry key="remote" value-ref="webframework.webscripts.scriptremote" />
<entry key="siteDetailsUtils" value-ref="customer.module.core.siteDetailsUtils" />
</map>
</property>
<property name="processorModelHelper" ref="processor.model.helper"></property>
</bean>
Now add your custom document-actions through the same xml-file:
<documentList>
<actionSets>
<actionSet id="empty"></actionSet>
<actionSet id="document">
<action type="action-link" id="onActionDetails" permission="edit" label="actions.document.edit-metadata" />
<action type="action-link" id="onActionCopyMetadata" permission="edit" label="actions.document.manage-copymetadata" />
<action type="action-link" id="onActionApplyMetadata" permission="edit" label="actions.document.manage-applymetadata" />
</actionSet>
</actionSets>
</documentList>
This was just a view notes on it - if i have time i want to continue that in next time.
Alfresco Share Wants To Speak To You All
Last time i have been spend time to wrote some news right here is as much in the past as i can not remember when i´ve been wrote this. But as you fairly know - consulting is not an 8-to-5 job. And yep we all have something like a private life so i have been left to write a new posting here.
But now i gave some smoke about Alfresco Share again so you can smell the spirit of Alfresco Share and new powerfull features again.
Well my personal challange was actually that we have something like a “Gap” between the Collaboration-Tools we currently have and the users wants to collaborate with each other to produce worthwell knowledge. To be sure, Alfresco Share is just a powerfull tool where companies IT-chiefs and consulting-strengths to start to convince endusers so that they able to work with that tool and not trying to relying on emails (”Hey guy, ill send you my 90mb powerpoint presentation again as ive changed a bit on slide 3!”).
One feature i have been mist the whole time is to cover endusers “humanity”-and what is more like this rather than voice and face? Collaboration includes not only a nice tool where i can post text but also a tool which enables the power of voice and “sightseeing”. For instance a creation of a concepy starts normally on a whiteboard? How to you want to reach this by now? Right, you have to start a teamviewer session (peer-to peer) webex or somethlink Adobes Connect Framework. Yes this works for sure - but do we need this all the time? Can we use a more “proper solution” which could be a little bit smarter? Smarter in such a way a user must not engaging itself to create a Webconference-Session, inviting colleques … Yes this is a turnover which is a obstacle in collaboration as you now - endusers “slackness” is a consequence through daily workign routines as well as “work pattern”. To break up this, we should not use a hammer instead something softer …
Now i want to introduce an integration between Alfresco and OpenMeeting. Through this integration you get the best of both worlds. On the one side, you get a powerfull set of collaboration tools to create content and documents and participate of “the flow of work” through Alfresco Share. On the other hand you got Openmeeting where you can start conferencing with your Share-Team about the current status through Voicing, Webcams and so on. The integration so far enables the user to connect automantically to Openmeeting through Alfresco Share component in the toolbar.

Now, if you pass the click you getting automatically connected into the conference-room where you can collaborate next level with you´re chatpartners like this:

As you can see, you particapte on techniques which are already available on the market since one decade like webcam-support. On the left side you can see all the users which have been connected to this room. On the right side the moderator is trying to create a high-level concept for a customer.
Now the cool part is, if your done with your meeting, you can transform the content which has been created through the meeting into a document and startover in alfresco share to particapte on these nice features.
Expose Liferay & Custom Services as JSON
![]() |
| Copyright graur razvan ionut @freedigitalphotos.net |
Well, this was not the easiest part last time. Honestly, i like the way alfresco does exchange data between its Alfresco-Share application and the repository. REST-Calls in JSON-Format is the most easist way to work out customers requirements. Just evaluating the body of the request/response and you can accessing data without marshelling, xml-validation and so on …
Now, in my current Liferay-Project i´d like to do in the same way to increase the productivity. And yes after some obstacles its pretty easy to reach this using Liferay - its almost easier as with Alfresco
But keep looking on the following lines …
Remote Services with Liferay are pretty simple to develop and expose using the Service-Builder. This feature is responsible to create (like ejb 2.1 and behyond) the local and remote stuff we´d like to use. Persistence and transaction-management comes along the way as a pretty nice feature - you can define a mapping according to your database-tables.
But i wont show you the way to persist data - i want to show you on how you can expose business logic to (legacy) systems using JSON as a response-format.
First of all we have to setup our SDK and EXT-Environment. We create via create-batch file a new ext-project and with that project we add a service.xml in ext-impl/src/com/wps/liferay/service.xml
<?xml version="1.0"?><service-builder package-path="com.wps.liferay"> <namespace>WPS</namespace> <entity name="SessionValidationManager" local-service="true" remote-service="true"/> </service-builder>
Now add to your ant-build file build.xml following property to select the service-file:
<property name="service.file" value="docroot/WEB-INF/com/wps/liferay/service.xml"></property>
Process the ant-tash build-service to create all that kind of stuff like a LocalService and a RemoteService. Refresh your workspace if youre using an IDE like Eclipse.
Now you have a lot of new classes located in ext-impl as well as in ext-service. Now you can add your business-logic to your classes that are names like SessionValidationManagerServiceImpl.java (EntityNameServiceImpl). In my example i add following method to that class (its still empty if you open it the first time):
public JSONObject validateUser(String String userId) {
// die some cool logic
return jsonObject;
}
Now, to propagate our businesslogic to the world-wide web, we have to start the “build service” task again. Dont worry about it, if you have done all correctly the service builder is smart enough to generate automatically all the implementation stuff that would rather than depend on you!
Refresh youre workspace again!
Now, please see the Util Class of your Entity (e.g. SessionValidationManagerServiceUtil) and you´l find your new facade method.
Thats all!
Deploy your code and open your browser. Type following into the browser:
http://localhost:8080/tunnel-web/secure/json?serviceClassName=com.wps.liferay.service.SessionValidationManagerServiceUtil&serviceMethodName=validateUser&serviceParameters=[userId]&userId=karlschmidt


Sebastian Wenzky works as "Head of ECM/Portals" at IT-Novum in Fulda. Alfresco, Spring, Hibernate, JBPM and - to much - coffee are now his companions. The corresponding company the right way to go.