Planet Hippo
Niels van Kampenhout (Hippo) — Creating a new document through the Hippo Repository Workflow APIJune 23, 2009 It's already a couple of months ago that I wrote about using the Hippo Repository Workflow API. Back then, I explained how to modify an existing document, and request publication. Ever since that blog post I have been getting the same question over and over again: how to create a new document through the repository API?
We will be creating a new document inside the folder /content/documents/news. This is actually a node of type hippostd:folder, which means a FolderWorkflow applies to this node. We will be creating a new document of type "defaultcontent:news", as provided with the Hippo CMS Quickstart WAR. We will call the new document "Hippo CMS 7.1 released!".Next, we get the folder node from the repository session:
We also need the workflow manager:
Using the workflow manager, get the folder node's workflow:
Check if the workflow is a folder workflow, and cast it to a FolderWorkflow object:
Now that we have the folder workflow, we can simply call the add method. It takes three String parameters: the category ("new-document"), the node type, and the node name:
That's it! Run the program, and check your CMS. There should be a new document "Hippo CMS 7.1 Released!" visible under the "news" folder. You can edit and publish this document just like any other. To modify the document through the API, see my previous post on this subject. For your convenience, here is the complete class: Read more... |
Tjeerd D. Brenninkmeijer (Hippo) — Walking the open source roadAt a recent conference, I was approached by an executive from a software company who wanted advice on how they could open their code. I’ve been in open source for many years; early open source developments simply evolved organically as collaborative projects, and there was no ‘right or wrong’ Read more... |
Vijay Kiran (Hippo) — Customizing Hippo CMS – Getting StartedJune 19, 2009 This post is part of a series which will be focusing mainly on Hippo CMS’s extensibility. These posts are more targeted towards the developers who want to customize and enhance the core CMS functionality. Introduction Hippo CMS is part of the Hippo’s Open Source Enterprise Content Management System. It provides a browser based user interface for managing the content in the Hippo Repository. Hippo CMS is fully customizable and developer friendly CMS that provides various ways to extend its functionality. Hippo CMS application is built using Apache Wicket, one the best frameworks available today for building web applications using Java. Wicket is known for its simplicity, and its component-oriented programming, thus providing solid base for the Hippo CMS. Hippo CMS has pluggable architecture which boasts of first class plug-in mechanism. Depending on your needs, you can create complex document types, extend and enhance the user interface and even create a combined add-on that can change the Core CMS and even replace. All you need to know to build the GUI add-ons is Java and Wicket. I’ll try to explain each of these extensibility in detailed examples in this series of blog posts. So let us get started. Yesterday we have announced a new version of Hippo CMS (version 7.1) and Hippo Site Toolkit 2(Version 2.03.09). Getting and Building Hippo CMS Before starting to checkout the source and building please make sure you have the following installed on your computer. Open a command line and check out the code for Hippo ECM using following command. Please note that if you are using an graphical client such as Tortose SVN, then you can checkout using the appropriate menu option. svn co http://svn.onehippo.org/repos/hippo/hippo-ecm/tags/Tag-HREPTWO-v2_06_06 cms-7.1 Now change to the cms-7.1 directory and build the Hippo ECM using maven. cd cms-7.1 mvn clean install [-DskipTests] If you are getting out of heap space error, set the MAVEN_OPTS using the following command: export MAVEN_OPTS="-Xms256m -Xmx700m -XX:MaxPermSize=1024m" If you are building for the first time, please note that it may take some time since maven needs to download all the dependencies. Once you are done with building Hippo ECM and you can run the provided Quick-start WAR file to get a feel of the user interface and the CMS application. Change to the quickstart/war directory and run the hippo-cms web application using embedded jetty. cd quickstart/war mvn jetty:run-war After jetty has been started, goto http://localhost:8080/cms to check the version of the CMS that you’ve just built. You can login using default username/password combination of admin/admin.
Note that you can even deploy the generated war file in Tomcat or an Application Server. Check the documentation for more information. This concludes the first part of Hippo CMS Customization Part 1- Getting Started . In the next post of this series we will see how to create a simple backend templates (a.k.a Document Types) using Document Type Editor provided within Hippo CMS. Read more... |
Mathijs Brand (Hippo) — Limited choicesJune 15, 2009
|
Jeroen Reijn (Hippo) — JCR: Sorting on child node propertiesJune 13, 2009 A JCR repository, like Apache Jackrabbit (basis for Hippo CMS 7's content repository), mainly consists of nodes and properties. The content modelLet's first start with my content model. The actual node definition for my project looks something like the below: I came into a situation where I wanted to search for nodes of type 'myproject:news', but sorted on the 'myproject:publicationDate' property of the 'myproject:metadata' subnode. Writing an XPath for such a query is quite easy if you're familiar with the XPath syntax. Let's start out with a very simple search and just search for nodes of the type 'myproject:news' , which in XPath looks like: Now if we would want to order these node types based on for instance the myproject:title property the same XPath query looks like: Now if we would want to sort on the 'myproject:publicationDate' property of the myproject:metadata subnode, I would expect the same XPath to be: Unfortunately this query did not seem to actually sort the result on the publicatenDate property as I would have expected. I was searching for typos first, but it appeared that the syntax of my query was ok, but it appeared that support for child axis in order by clauses was not yet supported by Jackrabbit itself. Then I found this JIRA issue[1] in the Jackrabbit bugtracker describing this problem and there appears to be a patch available. I'm still wondering how much of a performance impact this might have for large repositories, where you might want to sort on a property of a child node 'n'-levels deep underneath the actual node. If you want to sort on properties of a specific nodetype, you will have to add the sortable properties to the actual nodetype, which you are searching for and can't put them on a subnode. It seems that the patch, which should fix this problem, has already been comitted to the Jackrabbit trunk and should be available from Jackrabbit 1.6.0 as marked in the JackRabbit JIRA. Read more... |
Woonsan Ko (Hippo) — Spring Web MVC framework support in HST-2June 05, 2009 Spring Web MVC framework support in HST-2HST-2 has provided a basic support to enable developers to utilize Spring Framework IoC container for HST components. [1] Now, HST-2 provides even more. It supports Spring Web MVC Framework based applications under HST-2 environment! Using Read more... |
Jasha Joachimsthal (Hippo) — Hippo Site Toolkit Query interface and paginationJune 04, 2009 Today an interesting question came from a developer of one of our implementation partners. He wanted to list items from our JCR repository and use pagination. In this post I tried to make a summary out of the conversation. The query was:
HstQuery query = getQueryManager().createQuery(requestContext, scope, filterBean);
Filter filter = query.createFilter();
filter.addContains(".", "my keywords");
query.setFilter(filter);
HstQuery queryResult = query.execute();
The developer tried to get a paged result and the total number of items with: query.setOffset(0); query.setLimit(10); HippoBeanIterator hits = queryResult.getHippoBeans(); hits.getSize(); The result contained indeed 10 items but hits.getSize(); also returned 10. What's going wrong? Ard Schrijvers explained:
What about performance?
What if you need the total number of hits?
Read more... |
Recent Posts
- Ard Schrijvers (Hippo) (feed)
- Arje Cahn (Hippo) (feed)
- Arthur Bogaart (Hippo) (feed)
- Dennis Dam (Hippo) (feed)
- Jasha Joachimsthal (Hippo) (feed)
- Jeroen Reijn (Hippo) (feed)
- Jeroen Verberg (Hippo) (feed)
- Mathijs Brand (Hippo) (feed)
- Niels van Kampenhout (Hippo) (feed)
- Tjeerd D. Brenninkmeijer (Hippo) (feed)
- Vijay Kiran (Hippo) (feed)
- Woonsan Ko (Hippo) (feed)


I don't like to make choices. For me the best choice in life is - no choice at all. For example: I like to drink coffee. Any kind