Class CmsLoader
java.lang.Object
com.cloudforgeci.api.compute.CmsLoader
Auto-discovery utility for CmsSpec implementations using Java ServiceLoader.
This class discovers all CmsSpec implementations registered via META-INF/services/com.cloudforge.core.interfaces.ApplicationSpec and provides convenient access methods for deployment tools.
CMS platforms are discovered from:
- Built-in CMS applications in cloudforge-api module
- External plugins providing META-INF/services registration
Usage Example:
// Discover all CMS platforms
Map<String, CmsSpec> platforms = CmsLoader.discover();
// Get CMS by category
List<CmsSpec> ecommerceApps = CmsLoader.discoverByCategory("ecommerce");
List<CmsSpec> socialApps = CmsLoader.discoverByCategory("social");
// Find specific CMS
Optional<CmsSpec> wordpress = CmsLoader.findById("wordpress");
// Get all e-commerce platforms
List<CmsSpec> ecommerce = CmsLoader.discoverEcommerce();
- Since:
- 3.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondiscover()Discover all CmsSpec implementations via ServiceLoader.Discover all CmsSpec implementations as a list.discoverByCategory(String category) Discover CmsSpec implementations filtered by CMS category.discoverByPhpVersion(String phpVersion) Discover CMS platforms by PHP version requirement.Discover all available CMS categories.Discover all content management systems (category: "cms").Discover CMS platforms that support EC2 deployment.Discover all e-commerce platforms (category: "ecommerce").Discover CMS platforms that support Fargate deployment.Discover all forum platforms (category: "forum").Get CMS platforms grouped by category.Discover all learning management systems (category: "lms").Discover CMS platforms that support multi-site/multi-store.Discover CMS platforms that support object caching (Redis/Memcached).Discover CMS platforms that support OIDC integration.Discover CMS platforms that support S3 media storage.Discover all social networking platforms (category: "social").Discover all wiki platforms (category: "wiki").Find a specific CmsSpec by CMS ID.static StringPrint a formatted catalog of all discovered CMS platforms.
-
Method Details
-
discover
Discover all CmsSpec implementations via ServiceLoader.Returns a map of CMS ID to CmsSpec instance. The CMS ID is obtained from
ApplicationSpec.applicationId().CmsSpec implementations are discovered from the ApplicationSpec ServiceLoader registration and filtered to include only those that implement CmsSpec.
- Returns:
- map of CMS ID to CmsSpec (never null, may be empty)
-
discoverAsList
-
discoverByCategory
Discover CmsSpec implementations filtered by CMS category.CMS categories include:
- cms - Content management systems (WordPress, Joomla, Drupal)
- ecommerce - E-commerce platforms (WooCommerce, Magento, PrestaShop)
- social - Social networking (Dolphin/UNA, HumHub, Elgg)
- forum - Forum software (phpBB, Discourse, Flarum)
- wiki - Wiki platforms (MediaWiki, DokuWiki, BookStack)
- lms - Learning management (Moodle, Canvas, Chamilo)
- Parameters:
category- the CMS category to filter by- Returns:
- list of CmsSpec instances in this category
-
discoverCms
-
discoverEcommerce
-
discoverSocial
-
discoverForums
-
discoverWikis
-
discoverLms
-
discoverCategories
-
findById
-
discoverGroupedByCategory
-
discoverOidcEnabled
-
discoverS3MediaSupported
-
discoverObjectCacheSupported
-
discoverMultisiteSupported
-
discoverByPhpVersion
-
discoverFargateSupported
-
discoverEc2Supported
-
printCatalog
Print a formatted catalog of all discovered CMS platforms.Useful for debugging and displaying available platforms to users.
- Returns:
- formatted string containing CMS catalog
-