Register | Forgot password
Well, it’s been too long since my last (first) blog so it's time for me to add some knowledge ;)
As you all may know, GX Webmanager 9.7 is about to be released. It’s not for me to brag about all nice new features and functionality we add with 9.7 but I do want to tell you a bit more about one in particular: The developers’ API.
There are different ‘types’ of API’s you can make use of as a GX Webmanager developer. It’s all java but they do have a different purpose hence the distinction.
GX Webmanager 9.7.x will specifically add features to both the JSP- and the Content API even though the JSP one wasn’t deliberate but more a side effect of the notification framework also being added in WM 9.7.x
So what will be added?
These additions are useful when you want or need to create pages and/or mediaitems with basic content on them from within a WCB.
Examples:
Have a look at the following classes that form the cornerstones:
Workflow
The Workflow isn’t that straightforward since it makes use of the workflow capabilities supported by the underlying model that are hidden from the regular editor.
Let’s assume we’d want to set the workflow state of somePageVersion to one of the public ones’:
PageVersion somePageVersion = somePage.getCurrent();
somePageVersion.getWorkflowModelInstance();
WorkflowActivityInstance[] activityInstances = somePageVersion.getWorkflowModelInstance().getActivityInstances();
for (WorkflowActivityInstance activityInstance: activityInstances) {
WorkflowAction[] actions = activityInstance.getActivity().getActions();
for (WorkflowAction action: actions) {
if (action.getState().isPublic()) {
try {
pageService.performWorkflowAction(somePageVersion,action);
} catch (UnExecutableWorkflowActionException e) {
LOG.severe("Oops", e.getMessage(), e);
}
}
}
}
As you might suspect, we’re not finished with the API yet. In the ideal world you would be able to everything an editor can do via the API but that’s not true yet, so stay tuned ;)
PS. For those of you that don’t know yet, the API doc can be found at http://api.gxdeveloperweb.com
Michel is Professional Services Architect and is known for his unique approach to complex problems. Michel writes about both conceptual topics such as his interpretation of CMS Zen Garden and Thesaurus, to the more complex technical implementation topics.
Read all Michels blog entries
Other blog entries: