Connecting to an untrusted certificate in java

I was getting errors(unable to find valid certification path to requested target) in Alfresco trying to connect to LDAP over ssl using an untrusted certificate and found a great hint on the interwebs that I thought I’d share. Most of the hits on google mention this post: http://blogs.sun.com/gc/entry/unable_to_find_valid_certification My only criticism of that article is that it only minimally addresses how to actually use the fixed keystore. I downloaded their source and hacked it up a little change the name of the certificate store from “jssecacerts” into “cacert” which is the default certificate store for all java programs. My goal was to fix the certificate store for the entire machine. ...

February 20, 2011 · 1 min · Dan

Notes about Alfresco's devcon

Nate McMinn has a brief wrap up of the Alfresco developers convention. I was unable to attend and it sounds like I missed a lot of interesting news. I was excited to here: One upcoming project that was discussed at DevCon is putting together a third-party components catalog for Alfresco. Right now there is nothing like this available. Alfresco community projects are scattered all over the place. Some are in Alfresco Forge, some are on Google Code, still others are on developers’ blogs (mine included). I’m sure I’m forgetting a few locations, but you get the idea. Rolling all of this up in one queryable repository would be a fantastic addition to the Alfresco community. ...

November 8, 2010 · 1 min · Dan

Creating custom JMX MBeans for reporting in Alfresco

JMX rocks. When configuring a server it is a boon to developers. Especially when combined with the Alfresco subsystem architecture. You can interate on changes to the LDAP sync without having to restart the server. JMX also gives savvy system administrators a way to manage and monitor what’s going on within the repository. If you’re still unfamiliar with the basics of JMX, especially within the context of Alfresco, Jarred Ottley over at Alfresco has written a number of excellent tutorials. I’ve added some additional articles and come up with the list below. ...

November 8, 2010 · 3 min · Dan

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

Rapid development in Alfresco Share - the refresh webscript

Zia Consulting develops in Eclipse using a setup different than described by Alfresco. We run an embedded version of Jetty with the Alfresco default WARs. At runtime we mix in changes using extra classpath entries and web overlays. This has many benefits: most importantly that we develop functionality without having to restart the repository. When there is a reason to restart the server we make efforts to fix the problem through programming or configuration. ...

November 1, 2010 · 3 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

JBPM Workflow in Alfresco Share 3.4a community release

Dick Weisinger over at FormTek posted a great article on adding new workflows to the Share 3.4 using the newly updated form service. I’m currently developing similar functionality for 3.4b and found the same results - jbmp workflows just seems to work in the share interface. Article

October 26, 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

Attaching to a running Alfresco instance - running code in Alfresco

A coworker and I have been scheming for a number of months on ways to run migration scripts and develop workflow in Alfresco. The common thread is that we have a repository that’s running and we want run arbitrary code against it. We have had a number of ideas that have taken us in two different directions. I’d like to talk about a few of them, outline the issues we’ve run into and then outline our merged solution. ...

October 18, 2010 · 7 min · Dan

Building Alfresco enterprise from source v3.4 beta

Our development environment runs off an exploded a war file in an embedded version of jetty, all running in Eclipse. We typically build the war from source pulled from Alfresco Enterprise SVN. Knowing how to do this means we can checkout from any of the development branches and get a feeling for how different features are progressing without waiting for the official build to be distributed. It also give me a warm fuzzy to know how the beast is built. ...

October 11, 2010 · 2 min · Dan