Class MidPointPrincipal

  • All Implemented Interfaces:
    DebugDumpable, ShortDumpable, Serializable,
    Direct Known Subclasses:

    public class MidPointPrincipal
    extends Object
    implements, DebugDumpable, ShortDumpable
    Simple midPoint principal. This principal should contain only the concepts that are essential for midPoint core to work. It should not contain user interface concepts (e.g. adminGuiConfig). For that see GuiProfiledPrincipal.
    Radovan Semancik
    See Also:
    Serialized Form
    • Constructor Detail

      • MidPointPrincipal

        public MidPointPrincipal​(@NotNull
                                 @NotNull FocusType focus)
    • Method Detail

      • getAuthorities

        public Collection<Authorization> getAuthorities()
        Specified by:
        getAuthorities in interface
      • getPassword

        public String getPassword()
        Specified by:
        getPassword in interface
      • getUsername

        public String getUsername()
        Specified by:
        getUsername in interface
      • isAccountNonExpired

        public boolean isAccountNonExpired()
        Specified by:
        isAccountNonExpired in interface
      • isAccountNonLocked

        public boolean isAccountNonLocked()
        Specified by:
        isAccountNonLocked in interface
      • isCredentialsNonExpired

        public boolean isCredentialsNonExpired()
        Specified by:
        isCredentialsNonExpired in interface
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface
      • getFocus

        public @NotNull FocusType getFocus()
        Effective identity that is used to execute all actions. Authorizations of this identity will be applied. This is usually the logged-in user. However, this may be the user on behalf who are the actions executed (donor of power) and the real logged-in user may be the attorney.
      • getOid

        public String getOid()
      • getAttorney

        public FocusType getAttorney()
        Real identity of the logged-in user. Used in cases when there is a difference between logged-in user and the identity that is used to execute actions and evaluate authorizations. This may happen when one user (attorney) has switched identity to another user (donor of power). In that case the identity of the attorney is in this property. The user that was the target of the switch is stored in the "user" property.
      • setAttorney

        public void setAttorney​(FocusType attorney)
      • getPreviousPrincipal

        public MidPointPrincipal getPreviousPrincipal()
        Principal that was used before this principal was active. This is used when principals are chained (e.g. attorney)
      • setPreviousPrincipal

        public void setPreviousPrincipal​(MidPointPrincipal previousPrincipal)
      • setApplicableSecurityPolicy

        public void setApplicableSecurityPolicy​(SecurityPolicyType applicableSecurityPolicy)
      • debugDumpInternal

        protected void debugDumpInternal​(StringBuilder sb,
                                         int indent)
      • shortDump

        public void shortDump​(StringBuilder sb)
        Description copied from interface: ShortDumpable
        Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.
        Specified by:
        shortDump in interface ShortDumpable
        sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.