To call the TestModel class included with Alfresco, find all the libraries (.jar files) and folders containing XML. First create a Java project in Eclipse.
Simple Project Setup to Invoke Alfresco |
If you have the source available, you can link in the source files so that they can be browsed (Ctrl-Shift-T). Add all the libraries from the alfresco/WEB-INF/lib folder by right-clicking on the project and setting the build path as in the following screenshot.
Java Build Path for Alfresco JARs |
Next, define a Run Configuration that will invoke the TestModel class (the main method).
Run Configuration for the Alfresco TestModel Class |
XML File Argument |
Adding Folders to the Classpath |
Running the TestModel class will provide the following output showing that the model is good.
Errors
If you get an error like the following...
2012-03-27 09:38:25,431 WARN [repo.dictionary.DictionaryDAO] [http-8080-2] Type not found: {http://www.bekwam.com/model/custom/1.0}content
It may mean that there is a mismatch between the defined type and what appears in the web-client-config-custom.xml file.
Although it's desirable to avoid customizations in Alfresco, a client-specific content model can be very useful. Setup Eclipse to run TestModel to validate your custom content models and aspects.
No comments:
Post a Comment