public void createPortalConfig(NewPortalConfig config, String owner) throws Exception
{
try
{
String type = config.getOwnerType();
PortalConfig pconfig = getConfig(config, owner, type, PortalConfig.class);
if (pconfig == null)
{
// Ensure that the PortalConfig has been defined
// The PortalConfig could be empty if the related PortalConfigListener
// has been launched after starting this service
PortalConfig cfg = dataStorage_.getPortalConfig(type, owner);
if (cfg == null)
{
cfg = new PortalConfig(type);
cfg.setPortalLayout(new Container());
cfg.setName(owner);
dataStorage_.create(cfg);
}
return;
}
// We use that owner value because it may have been fixed for group names
owner = pconfig.getName();
//
PortalConfig currentPortalConfig = dataStorage_.getPortalConfig(type, owner);
if (currentPortalConfig == null)
{
dataStorage_.create(pconfig);
}
else