Interface SubjectDAO
- All Known Implementing Classes:
DefaultSubjectDAO
public interface SubjectDAO
A
SubjectDAO is responsible for persisting a Subject instance's internal state such that the Subject instance
can be recreated at a later time if necessary.
Shiro's default SecurityManager implementations typically use a SubjectDAO in conjunction
with a SubjectFactory: after the SubjectFactory creates a Subject instance, the
SubjectDAO is used to persist that subject's state such that it can be accessed later if necessary.
Usage
It should be noted that this component is used bySecurityManager implementations to manage Subject
state persistence. It does not make Subject instances accessible to the
application (e.g. via SecurityUtils.getSubject()).- Since:
- 1.2
- See Also:
-
Method Summary
-
Method Details
-
save
Persists the specified Subject's state for later access. If there is a no existing state persisted, this persists it if possible (i.e. a create operation). If there is existing state for the specifiedSubject, this method updates the existing state to reflect the current state (i.e. an update operation).- Parameters:
subject- the Subject instance for which its state will be created or updated.- Returns:
- the Subject instance to use after persistence is complete. This can be the same as the method argument if the underlying implementation does not need to make any Subject changes.
-
delete
-