You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ji...@apache.org on 2004/05/25 22:09:01 UTC
[jira] Commented: (JS2-54) Clean up jetspeed.groovy assembly script
The following comment has been added to this issue:
Author: Scott T Weaver
Created: Tue, 25 May 2004 1:08 PM
Body:
For increasing the usability of the jetspeed.groovy assembly script, I capitalized on Groovy's closure support.
// Shorthand for creating a ConstantParameter
cstParam = { key | return new ConstantParameter(key) }
// Shorthand for creating a ComponentParameter
cmpParam = { key | return new ComponentParameter(key) }
// Closure to perform easy building of Parameter[]
doParams =
{
paramList | paramArray = new Parameter[paramList.size()]
i = 0
for(param in paramList)
{
paramArray[i] = param
i++
}
return paramArray
}
which allows us to go from this:
container.registerComponentImplementation(PortletEntityAccessComponent, PortletEntityAccessComponentImpl, new Parameter[] {new ComponentParameter(PersistenceStoreContainer), new ConstantParameter("jetspeed")} )
to this much more readable and concise statement:
container.registerComponentImplementation(
PortletRegistryComponent,
PortletRegistryComponentImpl, doParams([cmpParam(PersistenceStoreContainer), cstParam("jetspeed")])
)
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/JS2-54?page=comments#action_35719
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/JS2-54
Here is an overview of the issue:
---------------------------------------------------------------------
Key: JS2-54
Summary: Clean up jetspeed.groovy assembly script
Type: Task
Status: Open
Priority: Major
Project: Jetspeed 2
Components:
Container
Versions:
2.0-a1
Assignee: Scott T Weaver
Reporter: Scott T Weaver
Created: Tue, 25 May 2004 1:01 PM
Updated: Tue, 25 May 2004 1:08 PM
Description:
1. Remove all references to NanoContainer
2. Write a simple unit test that verifies that the assembly script is syntactically correct and that the Engine initiallizes.
3. Make the assembly script generally more readable/easier to work with.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org