// Create the local project specific constraints.
CacheControlConstraintsMap defaultLocalCacheControlConstraintsMap
= createLocalCacheControlConstraintsMap();
PopulatableProjectManager projectManager =
new ProjectManagerImpl(projectLoader,
new RuntimeProjectConfiguratorImpl(
defaultLocalCacheControlConstraintsMap,
defaultRemoteCacheControlConstraintsMap,
pathURLMapper, policyCache),
repositoryContainer,
remoteReadersFactory);
// Create the activator.
PolicyReferenceFactory referenceFactory =
new PolicyReferenceFactoryImpl(projectManager);
PolicyActivator policyActivator =
initializeRepositoryObjectActivators(referenceFactory);
// Create the retriever to use to retrieve activated policies from
// any source.
RuntimePolicyFactory runtimePolicyFactory =
RuntimePolicyFactory.getDefaultInstance();
ActivatedPolicyRetriever activatedPolicyRetriever =
runtimePolicyFactory.createCachingRetriever(
policyActivator, projectManager, policyCache);
policyFetcher = new PolicyFetcherImpl(activatedPolicyRetriever);
// Initialize the projects
projectManager.createPredefinedProjects(projects, configContext,
defaultLocalCacheControlConstraintsMap,
policyCache.getLocalDefaultGroup());
RuntimeProject defaultProject = projectManager.getDefaultProject();
// Determine the repository within which the default project
// resides.
LocalRepository defaultRepository;