Package org.exoplatform.portal.config
Class NewPortalConfigListener
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.portal.config.NewPortalConfigListener
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class NewPortalConfigListener
extends org.exoplatform.container.component.BaseComponentPlugin
Created by The eXo Platform SARL Author : Tuan Nguyen
tuan08@users.sourceforge.net May 22, 2006
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionNewPortalConfigListener(UserPortalConfigService owner, org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.container.configuration.ConfigurationManager cmanager, org.exoplatform.container.xml.InitParams params, org.exoplatform.portal.mop.service.NavigationService navigationService, org.exoplatform.portal.mop.storage.DescriptionStorage descriptionStorage, UserACL userACL, org.exoplatform.services.resources.LocaleConfigService localeConfigService) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreatePage(NewPortalConfig config, String owner) voidcreatePageNavigation(NewPortalConfig config, String owner) booleancreatePortalConfig(NewPortalConfig config, String owner) <T> T<T> org.exoplatform.portal.config.model.UnmarshalledObject<T> getConfig(String portalType, String portalName, Class<T> objectType, String fileName, String parentLocation) <T> org.exoplatform.portal.config.model.UnmarshalledObject<T> getConfig(String portalType, String portalName, Class<T> objectType, String fileName, String parentLocation, String templateName) <T> org.exoplatform.portal.config.model.UnmarshalledObject<T> getConfig(String portalName, String portalType, Class<T> objectType, String parentLocation, List<String> relativePaths) <T> org.exoplatform.portal.config.model.UnmarshalledObject<T> getConfig(NewPortalConfig config, String portalName, String fileName, Class<T> objectType) Best effort to load and unmarshall a configuration.getPortalConfig(String type, String name) getPortalConfigs(String type, String name) getTemplateConfig(String type, String name) Deprecated, for removal: This API element is subject to removal in a future version.Site Templates has been changed to be stored in database to make it dynamically managed by UI rather than statis pages and navigation from source filesgetTemplateConfigs(String siteType) Deprecated, for removal: This API element is subject to removal in a future version.Site Templates has been changed to be stored in database to make it dynamically managed by UI rather than statis pages and navigation from source filesbooleanhasDefaultPage(NewPortalConfig config, String owner, String pageName) Checks whether the given packaged config fragment defines a default page namedpageName, without performing any import.voidinitPageDB(NewPortalConfig config) voidinitPageDB(NewPortalConfig ele, boolean prepareImport) voidinitPageNavigationDB(NewPortalConfig config) voidinitPageNavigationDB(NewPortalConfig ele, boolean prepareImport) voidinitPortalConfigDB(NewPortalConfig config) voidinitPortalConfigDB(NewPortalConfig ele, boolean prepareImport) voidThis is used to merge an other NewPortalConfigListener to this onebooleanrestorePage(NewPortalConfig config, String owner, String pageName, org.exoplatform.portal.mop.importer.ImportMode importMode) Restores a single page's layout from its packaged default configuration, leaving every other page and the navigation tree untouched.voidrun()Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
Method Details
-
run
- Throws:
Exception
-
getPortalConfig
-
getPortalConfigs
-
mergePlugin
This is used to merge an other NewPortalConfigListener to this one- Parameters:
other-
-
initPortalConfigDB
-
initPortalConfigDB
-
initPageDB
-
initPageDB
-
createPortalConfig
-
createPage
-
restorePage
public boolean restorePage(NewPortalConfig config, String owner, String pageName, org.exoplatform.portal.mop.importer.ImportMode importMode) Restores a single page's layout from its packaged default configuration, leaving every other page and the navigation tree untouched.- Parameters:
config- the packaged config fragment to look up the default page inowner- the site owner namepageName- the name of the page to restoreimportMode- the import mode to apply to the matched page- Returns:
trueif this fragment defines a default page namedpageNameand it was restored,falseif this fragment doesn't define that page
-
hasDefaultPage
Checks whether the given packaged config fragment defines a default page namedpageName, without performing any import. This mirrors the lookup done byrestorePage(NewPortalConfig, String, String, ImportMode)but leaves the page untouched.- Parameters:
config- the packaged config fragment to look up the default page inowner- the site owner namepageName- the name of the page to look up- Returns:
trueif this fragment defines a default page namedpageName
-
getConfig
public <T> org.exoplatform.portal.config.model.UnmarshalledObject<T> getConfig(NewPortalConfig config, String portalName, String fileName, Class<T> objectType) Best effort to load and unmarshall a configuration.- Type Parameters:
T- the generic type to unmarshall to- Parameters:
config- the config objectportalName- the ownerfileName- the file nameobjectType- the type to unmarshall to- Returns:
- the xml of the config or null
-
getConfig
-
getConfig
-
getConfig
-
getConfig
-
getConfig
-
getTemplateConfig
Deprecated, for removal: This API element is subject to removal in a future version.Site Templates has been changed to be stored in database to make it dynamically managed by UI rather than statis pages and navigation from source files- Parameters:
type-name-- Returns:
-
getTemplateConfigs
Deprecated, for removal: This API element is subject to removal in a future version.Site Templates has been changed to be stored in database to make it dynamically managed by UI rather than statis pages and navigation from source filesGet all template configurations- Parameters:
siteType- (portal, group, user)- Returns:
- set of template name
-