- // UID factory
- CmsUuidFactory uuidFactory = new CmsUuidFactory();
- Component<CmsUuidFactory> uuidFactoryC = new Component.Builder<>(uuidFactory) //
- .addType(UuidFactory.class) //
- .build(register);
-
- // Content Repository
- DeployedContentRepository contentRepository = new DeployedContentRepository();
- Component<DeployedContentRepository> contentRepositoryC = new Component.Builder<>(contentRepository) //
- .addType(ProvidedRepository.class) //
- .addType(ContentRepository.class) //
- .addActivation(contentRepository::start) //
- .addDeactivation(contentRepository::stop) //
- .addDependency(cmsStateC.getType(CmsState.class), contentRepository::setCmsState, null) //
- .addDependency(uuidFactoryC.getType(UuidFactory.class), contentRepository::setUuidFactory, null) //
- .build(register);
-