return ((UserRegistry)registry).getChrootedRegistry(THEME_ADMIN_PATH);
}
public static void loadResourceThemes() throws RegistryException {
// loads the tenant0's system registry
UserRegistry systemRegistry = registryService.getGovernanceSystemRegistry();
// we are not checking whether the theme resources already exists to make sure, the newly
// added themes can be loaded just at the activation of the component
String themeRootFileName = System.getProperty(ServerConstants.CARBON_HOME) + File
.separator + "resources" + File.separator + "allthemes";
// we are always making this accessible from anyware
File themeRootFile = new File(themeRootFileName);
ThemeUtil.transferAllThemesToRegistry(themeRootFile, systemRegistry, StratosConstants.ALL_THEMES_PATH);
CommonUtil.setAnonAuthorization(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH + StratosConstants.ALL_THEMES_PATH,
systemRegistry.getUserRealm());
}