Class ProfileDefinition<P extends CommonProfile>

    • Constructor Detail

      • ProfileDefinition

        public ProfileDefinition()
    • Method Detail

      • newProfile

        public P newProfile​(Object... parameters)
        Return the new built profile.
        Parameters:
        parameters - some optional input parameters
        Returns:
        the new built profile
      • convertAndAdd

        public void convertAndAdd​(CommonProfile profile,
                                  AttributeLocation attributeLocation,
                                  String name,
                                  Object value)
        Convert a profile or authentication attribute, if necessary, and add it to the profile.
        Parameters:
        profile - The profile.
        attributeLocation - Location of the attribute inside the profile: classic profile attribute, authentication attribute, ...
        name - The attribute name.
        value - The attribute value.
      • convertAndAdd

        public void convertAndAdd​(CommonProfile profile,
                                  Map<String,​Object> profileAttributes,
                                  Map<String,​Object> authenticationAttributes)
        Convert the profile and authentication attributes, if necessary, and add them to the profile.
        Parameters:
        profile - The profile.
        profileAttributes - The profile attributes. May be null.
        authenticationAttributes - The authentication attributes. May be null.
      • setProfileFactory

        protected void setProfileFactory​(Function<Object[],​P> profileFactory)
        Define the way to build the profile.
        Parameters:
        profileFactory - the way to build the profile
      • primary

        protected void primary​(String name,
                               AttributeConverter<? extends Object> converter)
        Add an attribute as a primary one and its converter.
        Parameters:
        name - name of the attribute
        converter - converter
      • secondary

        protected void secondary​(String name,
                                 AttributeConverter<? extends Object> converter)
        Add an attribute as a secondary one and its converter.
        Parameters:
        name - name of the attribute
        converter - converter
      • getPrimaryAttributes

        public List<String> getPrimaryAttributes()
      • getSecondaryAttributes

        public List<String> getSecondaryAttributes()
      • setProfileId

        public void setProfileId​(String profileId)
      • getProfileId

        public String getProfileId()