Kernel Services
The Sakai Kernel provides essential services that are used throughout the platform. These services handle core functionality like user management, authorization, content hosting, and event tracking.All tools should use kernel services for core functionality rather than implementing their own user management, authorization, or content storage systems.
What is the Kernel?
The Kernel contains the basic services that are used throughout Sakai. It provides:- API layer: Service interfaces defining contracts
- Implementation layer: Concrete implementations of services
- Component Manager: Spring-based service wiring and lifecycle management
- Utility classes: Common utilities like
FormattedText
Core Kernel Services
User Management Services
UserDirectoryService
Manages end-user modeling for Sakai including user creation, lookup, and authentication.Authorization Services
AuthzGroupService
Manages authorization groups (realms) and checks if users are allowed to perform specific functions in a context.The
AuthzGroupService doesn’t automatically validate that user IDs are still valid. If you need to ensure a user exists, check with UserDirectoryService.Site Management Services
SiteService
Manages Sakai sites (workspaces, course sites, project sites).Content Management Services
ContentHostingService
Manages shared content resources and collections, based on WebDAV terminology.Key Concepts:
- Resource: A file with media type, ID, and properties
- Collection: A folder containing resources (also a resource itself)
- Properties: WebDAV-style name-value pairs (“live” generated by system, “dead” user-maintained)
Event Tracking Services
EventTrackingService
Provides activity event tracking and monitoring throughout Sakai.Complete List of Kernel Services
The kernel provides implementations for these core services:View All Kernel Services
View All Kernel Services
| Service | Package | Purpose |
|---|---|---|
| Alias | org.sakaiproject.alias | Manage resource aliases |
| Antivirus | org.sakaiproject.antivirus | Virus scanning for uploads |
| Authz | org.sakaiproject.authz | Authorization and permissions |
| Cluster | org.sakaiproject.cluster | Cluster management |
| Component | org.sakaiproject.component | Component/service wiring |
| Conditions | org.sakaiproject.conditions | Conditional release |
| ConfigStore | org.sakaiproject.config | Configuration storage |
| Content | org.sakaiproject.content | Content hosting (files) |
| DB | org.sakaiproject.db | Database access |
org.sakaiproject.email | Email sending | |
| Entity | org.sakaiproject.entity | Entity management |
| Event | org.sakaiproject.event | Event tracking |
| Memory | org.sakaiproject.memory | Caching services |
| MessageBundle | org.sakaiproject.messagebundle | i18n message bundles |
| Messaging | org.sakaiproject.messaging | Messaging/notifications |
| Site | org.sakaiproject.site | Site management |
| Tasks | org.sakaiproject.tasks | Task management |
| Time | org.sakaiproject.time | Time/date utilities |
| Tool | org.sakaiproject.tool | Tool registration |
| User | org.sakaiproject.user | User management |
Service Implementation Pattern
Each kernel service follows this structure:Example: Site Service Wiring
Utility Classes
The kernel also provides common utility classes:FormattedText
One of the most commonly used utilities for processing and sanitizing HTML:Best Practices
Use Kernel Services
Always use kernel services for user management, authorization, content storage, and email rather than implementing your own.
Service Location
Access services via
ComponentManager.get() rather than direct instantiation.Transaction Management
Use Spring transaction management for database operations.
Event Posting
Post events for significant user actions to enable analytics and integration.
Next Steps
Tool Architecture
Learn how to build tools using kernel services
Sites & Workspaces
Understand sites, pages, and tool placement