Class AbstractPersistentIdDataConnector

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • generatedAttribute

        @NonnullAfterInit
        private String generatedAttribute
        ID of the attribute generated by this data connector.
    • Constructor Detail

      • AbstractPersistentIdDataConnector

        public AbstractPersistentIdDataConnector()
    • Method Detail

      • getSourceAttributeInformation

        @Nullable
        @NonnullAfterInit
        public String getSourceAttributeInformation()
        Get Information about the attribute whose first value is used when generating the computed ID. This is derived from the sourceID (if present) and/or the dependencies. Public purely as an aid to testing.
        Returns:
        log-friend information.
      • getGeneratedAttributeId

        @NonnullAfterInit
        public String getGeneratedAttributeId()
        Get the ID of the attribute generated by this connector.
        Returns:
        ID of the attribute generated by this connector
      • setGeneratedAttributeId

        public void setGeneratedAttributeId​(@Nullable
                                            String newAttributeId)
        Set the ID of the attribute generated by this connector.
        Parameters:
        newAttributeId - what to set.
      • doDependencyInformation

        private void doDependencyInformation()
                                      throws ComponentInitializationException
        Do the dance with dependencies. Old style ones get the sourceId added (failing if it isn't there). New style ones get their names added to the information string.
        Throws:
        ComponentInitializationException - if the dependencies are not aligned correctly
      • resolveSourceAttribute

        @Nullable
        protected String resolveSourceAttribute​(@Nonnull
                                                AttributeResolverWorkContext workContext)
        Helper function to locate the source Attribute in the dependencies.
        Parameters:
        workContext - the context to look in
        Returns:
        the value, or null in any of the failure cases.
      • encodeAsAttribute

        @Nullable
        protected Map<String,​IdPAttribute> encodeAsAttribute​(@Nullable
                                                                   String value)
        Encode the provided string.
        Parameters:
        value - the value to encode or null if that failed
        Returns:
        null or the attribute.