Thanks for sharing this Matt, see inline
On 05/25/2011 05:08 AM, Matt Wringe wrote:
There have been some discussion on creating an api package to create
a
simple way for people to interact and manipulate a gatein portal.
Example situations would be things like creating a gadget, adding an
application to a category, creating a page and adding it to a node,
adding applications to a page, managing users, etc...
First I want to reiterate that for the scope of next release we said we
stick with:
- application registry features
- page/navigation node metadata
So
- creating a page
- adding apps to a page
- managing users
is out of scope for the coming release. (will be for the release after)
Two different solutions have been created, both are a bit different
in
approach. These are preliminary and are not meant to be complete, it is
more meant to start of a discussion:
https://github.com/metacosm/gatein-api
Some rough notes I took while looking into it, I mainly looked at the
testcases/usecases
https://github.com/metacosm/gatein-api/blob/master/src/test/java/org/gate...
Looks like 2 first tests are contradicting themselves:
assert portal.getContentRegistry().getCategory("inexistent") == null;
assert portal.getContentRegistry().getCategory("inexistent") != null;
************
public void assigningContentToAWindowOnAPage()
is out of scope of what we will provide in that version, we agreed to
have read-only info about pages/navigation nodes information without the
info about page compositions.
************
public void assigningContentToACategory()
registry.getOrCreateCategory("category");
I prefer getCategory() and createCategory() to be distinct (with proper
exceptions), plus if there is a need for a getOrCreate or
getCategory(String name, boolen create) we can add it later
category.getKnownManagedContentIds();
Meaning ? Confused about the testcase. What's a ManagedContent ?
I was actually expecting something more like:
Portlet portlet = new Portlet(...);
Category category = new Category(...);
category.add(portlet);
contentRegistry.save(category);
************
https://github.com/metacosm/gatein-api/blob/master/src/test/java/org/gate...
getSingleResult in Hibernate isn't the best thing created, it actually
didn't make it through the JPA API.
I would rather remove this method from the API, and potentially add it
in some form later if really needed.
- Nodes.getSingleOrFail(Query.<Dashboard>builder().where(filter).build());
I haven't looked yet into that one.
Lets start a discussion on the above apis and what you would expect
to
come from an api like this.
Thanks,
Thomas.
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev
--
Thomas Heute
Technical Development Manager | JBoss Enterprise Platform & GateIn
+41 32 720 9266 | Switzerland
Twitter:
http://twitter.com/theute
EPP Blog:
http://jboss-epp.professional-blog.com