All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.randombits.confluence.metadata.indexing.IndexManager Maven / Gradle / Ivy

There is a newer version: 7.4.1
Show newest version
package org.randombits.confluence.metadata.indexing;

import org.randombits.confluence.metadata.FieldNotFoundException;

import java.util.List;
import java.util.Map;

/**
 * Interface to interact with metadata index.
 *
 * @author kaifung
 * @since 7.0.0.20150209
 */
public interface IndexManager {

    /**
     * Retrieve the indexed String type value of specified name on a specified content.
     *
     * @param contentId
     * @param fieldName
     * @param clazz Type of the field to look for, e.g. passing String.class will limit the query to string type fields.
     * @return Value of type T.
     * @throws IllegalArgumentException when {@literal clazz} type is not supported.
     * @throws FieldNotFoundException when fieldName cannot be found.
     */
     T query(String contentId, String fieldName, Class clazz) throws IllegalArgumentException, FieldNotFoundException;

    /**
     * Retrieve the indexed String type value of specified name on a specified content.
     *
     * @param contentId
     * @param path
     * @param fieldName
     * @param clazz Type of the field to look for, e.g. passing String.class will limit the query to string type fields.
     * @return Value of type T.
     * @throws IllegalArgumentException when {@literal clazz} type is not supported.
     * @throws FieldNotFoundException when fieldName cannot be found.
     */
     T query(String contentId, List path, String fieldName, Class clazz) throws IllegalArgumentException, FieldNotFoundException;

    /**
     * Build the index of specified content with specified metadata.
     *
     * @param contentId
     * @param metadata
     */
    void buildIndex(String contentId, Map metadata);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy