[gatein-issues] [JBoss JIRA] Created: (GTNPORTAL-1179) Provide an option in NewPortalConfigListener allowing to override portal navigation metadata from the XML configuration files each time the server restarts
Trong Tran (JIRA)
jira-events at lists.jboss.org
Tue May 11 00:03:05 EDT 2010
Provide an option in NewPortalConfigListener allowing to override portal navigation metadata from the XML configuration files each time the server restarts
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-1179
URL: https://jira.jboss.org/jira/browse/GTNPORTAL-1179
Project: GateIn Portal
Issue Type: Task
Security Level: Public (Everyone can see)
Affects Versions: 3.0.0-GA
Reporter: Trong Tran
Assignee: Trong Tran
This is a very useful feature for developpement because it allows to change portal navigation without dumping the whole JCR. It dramatically shortcuts the developpement/deploy cycle.
The logic contained within the ExtendedPortalConfigListener can be merged in the NewPortalConfigListener also.
{code}
public class ExtendedPortalConfigListener extends NewPortalConfigListener {
private UserPortalConfigService portalConfigService;
List<NewPortalConfig> configs;
boolean override;
@SuppressWarnings("unchecked")
public ExtendedPortalConfigListener(UserPortalConfigService portalConfigService, DataStorage pdcService,
ConfigurationManager cmanager, InitParams params) throws Exception {
super(pdcService, cmanager, params);
this.portalConfigService = portalConfigService;
configs = params.getObjectParamValues(NewPortalConfig.class);
ValueParam param = params.getValueParam("override");
if (param != null) {
override = Boolean.parseBoolean(param.getValue());
}
}
@Override
public void run() throws Exception {
if (override) {
for (NewPortalConfig config : configs) {
Set<String> users = config.getPredefinedOwner();
for (String user : users) {
try {
portalConfigService.removeUserPortalConfig(user);
} catch (Exception e) {
System.err.println(e.getMessage());
}
}
}
}
super.run();
}
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list