|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.bastille.pageseeder.GetMemberGroups
public final class GetMemberGroups
A generator that returns the list of projects and groups a user is a member of.
There is no configuration associated with this generator.
No parameter required, however, the user does need to be logged in as a PageSeeder User.
This generator invokes a PageSeeder service and returns the content of this service verbatim.
The content is wrapped in:
<ps-service resource="/members/[member id]/projects"
http-status="[status code]"
content-type="application/xml">
<!-- XML returned by PageSeeder Service -->
</ps-service>
The PageSeeder service returns the projects and group in hierarchical form.
<projects for="[user email]">
<!-- for each project -->
<project id="[project id]" name="[name]"
description="[description]"
owner="[owner]" owner-directory="[owner dir]">
<!-- for each group/sub-project -->
<group id="[group id]" name="[name]"
description="[description]"
owner="[owner]" owner-directory="[owner dir]"/>
<!-- more groups / sub-project ... -->
</project>
<!-- more projects ... -->
</projects>
If an error occurs while invoking the service, the XML will also include the
error
and message
attributes. The HTTP status should
correspond to an HTTP error code.
<ps-service resource="/members/[member id]/projects"
http-status="[error]"
content-type="application/xml"
error="[error-type]"
message="[error-message]">
</ps-service>
<content generator="org.weborganic.bastille.pageseeder.GetMemberGroups"
name="classes" target="main" status="ok">
<ps-service resource="/members/123/projects" http-status="200"
content-type="application/xml">
<projects for="No Email">
<project id="5" name="Project X"
owner="XYZ" owner-directory="project_x"
description="This is Project X">
<project id="6" name="project_x-2011"
description="Project X in 2011 (Sub-project)"
owner="XYZ" owner-directory="project_x-2011">
<group id="7" name="project_x-2011-dev"
description="Dev group on project X in 2011"
owner="XYZ" owner-directory="project_x-2011"/>
</project>
</project>
</projects>
</ps-service>
</content>
To use this generator in Berlioz (in /WEB-INF/config/services.xml
):
<generator class="org.weborganic.bastille.pageseeder.GetMemberGroups"
name="[name]" target="[target]"/>
Constructor Summary | |
---|---|
GetMemberGroups()
|
Method Summary | |
---|---|
void |
process(ContentRequest req,
XMLWriter xml)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetMemberGroups()
Method Detail |
---|
public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException
process
in interface ContentGenerator
BerliozException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |