Using Alfresco for authentication in Spring Surf

Kevin Roast’s blog had a great post about Authentication User’s against an Alfresco Repository. When we first explored Surf, when it starting to get traction in 3.2 or 3.3 our major complaint was that it seemed difficult to actually connect to the repository. I’m glad to see that this has changed. Or that it is now better documented. Technorati Tags: Alfresco

November 2, 2010 · 1 min · Dan

Creating calculated datalist columns in Alfresco Share 3.4b

This is a short one since not much changed. If you didn’t have a chance to read the 3.3 version of this please review it now since I’m not going to post the entire tutorial again. We only need to change the filter and specifically how the dynamic columns are added to the form. public class ProjectStatusFilter extends AbstractFilter { @Override public void afterGenerate(Object item, List fields, List forcedFields, Form form, Map context) { boolean typeDefCorrect = (item instanceof TypeDefinition && ((TypeDefinition) item) .getName().equals(PmoModel.TYPE_PROJECT_STATUS_DL)); boolean nodeRefCorrect = (item instanceof NodeRef && AlfUtil.services() .getNodeService().getType((NodeRef) item).equals( PmoModel.TYPE_PROJECT_STATUS_DL)); if (typeDefCorrect || nodeRefCorrect) { double varianceValue = 0d; double percentComplete = 0d; double percentExpended = 0d; // If this is a node then do the calculations if (nodeRefCorrect) { NodeRef itemNode = (NodeRef) item; /* Some calculations that aren't interesting */ } /* Here are the changes for 3.4b */ form.addField(FieldUtils.makePropertyField(PmoModel.variancePropDef, varianceValue,AlfUtil.services().getNamespaceService())); } } /* Left the other 3 fuctions for completeness */ @Override public void afterPersist(Object item, FormData data, NodeRef persistedObject) {} @Override public void beforeGenerate(Object item, List fields, List forcedFields, Form form, Map context) {} @Override public void beforePersist(Object item, FormData data) {} }

October 28, 2010 · 1 min · Dan

Creating calculated datalist columns in Alfresco Share 3.3

Datalists out-of-the-box don’t have a whole lot of functionality outside of simply capturing data. A simple way to help users is to add calculated columns that transform other columns or related data from the repository. In Alfresco 3.3 this functionality is straightforward and allows creating powerful datalists that even an Excel user could love. For this demo we will create a part of a project management datalist that takes allows users to enter the following: Estimated to completion, estimated at completion, actuals and budget. From these inputs we will generate the variance, percent complete and percent expended. ...

October 25, 2010 · 4 min · Dan

Using Jar deployment to solve conflicts with multiple customizations in Alfresco Share

Installing customizations using AMPs into a new Alfresco repository is pretty easy, there isn’t much room for configuration overwriting other configuration. In older systems that have been installed by a client or in systems that have multiple SI’s customizations installed it maybe the case, especially in Share, where configuration from one amp overwrites the configuration of another amp. You can get into difficult to detect problems depending on the order in which amps are applied to Alfresco (probably alphanumeric, last one wins). ...

September 2, 2010 · 2 min · Dan