Class AbstractUserProfileBean

  • Direct Known Subclasses:
    IdpReviewProfileBean, RegisterBean, VerifyProfileBean

    public abstract class AbstractUserProfileBean
    extends Object
    Abstract base for Freemarker context bean providing informations about user profile to render dynamic or crafted forms.
    Vlastimil Elias
    • Constructor Detail

      • AbstractUserProfileBean

        public AbstractUserProfileBean​(<String,​String> formData)
    • Method Detail

      • init

        protected void init​(KeycloakSession session,
                            boolean writeableOnly)
        Subclass have to call this method at the end of constructor to init user profile data.
        session -
        writeableOnly - if true then only writeable (no read-only) attributes are put into template, if false then all readable attributes are there
      • getAttributeDefaultValues

        protected abstract Stream<String> getAttributeDefaultValues​(String name)
        Get attribute default values to be pre-filled into the form on first show.
        name - of the attribute
        attribute default value (can be null)
      • getContext

        public abstract String getContext()
        Get context the template is used for, so view can be customized for distinct contexts.
        name of the context
      • getAttributes

        public List<AbstractUserProfileBean.Attribute> getAttributes()
        All attributes to be shown in form sorted by the configured GUI order. Useful to render dynamic form.
        list of attributes
      • getAttributesByName

        public Map<String,​AbstractUserProfileBean.Attribute> getAttributesByName()
        Get map of all attributes where attribute name is key. Useful to render crafted form.
        map of attributes by name