Page History
...
Example | Old Form | New Form | ||||
---|---|---|---|---|---|---|
WorkspaceItem Example |
|
| ||||
WorkflowManager Example |
|
| ||||
Collection Edit Example |
|
| ||||
|
|
End of Context?!
I the above examples, it clear that the context object has been dropped and replaced with a new object called "DSpace", note that "DSpace" is the entry point into all Services that interact with the DSpace Domain model, Services apply to one or more levels of the Application Stack:
- Persistence Tier: Services can be provided that interact with the storage level, these services will be aggregated together to form a solution for persistence of the Domain model into one or more alternative storage platforms.
- Domain Services Tier: Expose Domain Model Objects and provide Business Services that can perform important actions abstracted from both the Persistence and Presentation Tiers.
- Presentation Tier: One or more "Applications" responsible for receiving requests from clients and controlling presentation of results.
The Legacy DSpace Context, is now internalized, stored within the DSpace request and provided via a Legacy Context Service when applications still require direct acces to it. It is no longer the responsibility of the Application developer to track the context and its state, any open context will be committed or aborted at the end of the cycle for the current application request.
However, if the application developer does need access to the context for legacy purposes, it will be available via the Service manager.
Code Block |
---|
public interface IContextService {
public IContext getCurrentContext();
} |
Code Block |
---|
DSpace dspace = new DSpace();
Context context = dspace.getSingletonService(IContextService.class).getCurrentContext();
|
API Contracts for the DSpace Domain Model
...