- All Known Implementing Classes:
public interface SubjectDAOA
SubjectDAOis 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
SecurityManagerimplementations typically use a
SubjectDAOin conjunction with a
SubjectFactory: after the
SubjectDAOis used to persist that subject's state such that it can be accessed later if necessary.
UsageIt should be noted that this component is used by
SecurityManagerimplementations to manage Subject state persistence. It does not make Subject instances accessible to the application (e.g. via
- See Also:
savePersists 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 specified
Subject, this method updates the existing state to reflect the current state (i.e. an update operation).
subject- the Subject instance for which its state will be created or updated.
- 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.