Class VirtualAttributeProvider<T extends VirtualAttributeCfg>

    • Constructor Detail

      • VirtualAttributeProvider

        public VirtualAttributeProvider()
    • Method Detail

      • initializeVirtualAttributeProvider

        public void initializeVirtualAttributeProvider​(ServerContext serverContext,
                                                       T configuration)
                                                throws ConfigException,
                                                       InitializationException
        Initializes this virtual attribute based on the information in the provided configuration entry.
        Parameters:
        serverContext - The server context
        configuration - The configuration to use to initialize this virtual attribute provider.
        Throws:
        ConfigException - If an unrecoverable problem arises in the process of performing the initialization.
        InitializationException - If a problem occurs during initialization that is not related to the server configuration.
      • initializeVirtualAttributeProvider

        protected void initializeVirtualAttributeProvider​(T configuration)
                                                   throws ConfigException,
                                                          InitializationException
        Initializes this virtual attribute based on the information in the provided configuration entry.
        Parameters:
        configuration - The configuration to use to initialize this virtual attribute provider.
        Throws:
        ConfigException - If an unrecoverable problem arises in the process of performing the initialization.
        InitializationException - If a problem occurs during initialization that is not related to the server configuration.
      • getServerContext

        protected ServerContext getServerContext()
        Return the server context.
        Returns:
        the server context
      • isConfigurationAcceptable

        public boolean isConfigurationAcceptable​(T configuration,
                                                 List<LocalizableMessage> unacceptableReasons)
        Indicates whether the provided configuration is acceptable for this virtual attribute provider. It should be possible to call this method on an uninitialized virtual attribute provider instance in order to determine whether the virtual attribute provider would be able to use the provided configuration.
        Parameters:
        configuration - The virtual attribute provider configuration for which to make the determination.
        unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
        Returns:
        true if the provided configuration is acceptable for this virtual attribute provider, or false if not.
      • finalizeVirtualAttributeProvider

        public void finalizeVirtualAttributeProvider()
        Performs any finalization that may be necessary whenever this virtual attribute provider is taken out of service.
      • getAttribute

        public abstract Attribute getAttribute​(Entry entry,
                                               AttributeDescription attributeDescription)
        Generates an unmodifiable attribute with the values for the provided entry.
        Parameters:
        entry - The entry for which the values are to be generated.
        attributeDescription - the attribute description corresponding to this virtual attribute
        Returns:
        The unmodifiable attribute with the values generated for the provided entry. It may be empty, but it must not be null.
      • isMultiValued

        public abstract boolean isMultiValued()
        Indicates whether this virtual attribute provider may generate multiple values.
        Returns:
        true if this virtual attribute provider may generate multiple values, or false if not.
      • isSearchable

        public boolean isSearchable​(AttributeDescription attributeDescription,
                                    SearchOperation searchOperation)
        Indicates whether this attribute may be included in search filters as part of the criteria for locating entries.
        Parameters:
        attributeDescription - the attribute description corresponding to this virtual attribute
        searchOperation - The search operation for which to make the determination.
        Returns:
        true if this attribute may be included in search filters, or false if not.
      • processSearch

        public void processSearch​(AttributeDescription attributeDescription,
                                  SearchOperation searchOperation)
                           throws LdapException
        Processes the provided search operation in which the search criteria includes an operation targeted at this virtual attribute. This method should only be called if isSearchable returns true and it is not possible to construct a manageable candidate list by processing other elements of the search criteria.
        Parameters:
        attributeDescription - the attribute description corresponding to this virtual attribute
        searchOperation - The search operation to be processed.
        Throws:
        LdapException