@Deprecated public interface

DeprecatedChangesetIndex

com.atlassian.stash.idx.DeprecatedChangesetIndex
Known Indirect Subclasses

This interface is deprecated.
in 3.4 for removal in 4.0. Use CommitIndex instead, which more accurately reflects the purpose of this component

Class Overview

Index to store meta data around changesets. This interface serves to decouple changeset indexing from storing metadata in an index.

Summary

Public Methods
@Deprecated void addAttribute(String csid, String name, String value)
This method is deprecated. in 3.4 for removal in 4.0. Use addProperty(String, String, String) instead
void addChangeset(Changeset changeset, Repository repository)
Associates the provided Changeset with the specified Repository.
@Deprecated @Nonnull Changeset enrichChangeset(Changeset changeset, Repository repository, Collection<String> attributeNames)
This method is deprecated. in 2.12 for removal in 4.0. Use CommitEnricher, which applies other useful attributes in addition to index data, instead.
@Deprecated @Nonnull Page<Changeset> enrichChangesets(Page<Changeset> changesets, Repository repository, Collection<String> attributeNames)
This method is deprecated. in 2.12 for removal in 4.0. Use CommitEnricher, which applies other useful attributes in addition to index data, instead.
@Deprecated @Nonnull Page<IndexedChangeset> findChangesetsByAttribute(String attributeName, String attributeValue, boolean caseSensitive, PageRequest pageRequest)
This method is deprecated. in 3.4 for removal in 4.0. Use findByProperty(String, String, boolean, PageRequest) instead
@Deprecated @Nonnull AttributeMap getAttributeValues(String csid, Collection<String> attributeNames)
This method is deprecated. in 3.4 for removal in 4.0. Use getProperties(String, Iterable) instead.
@Deprecated @Nonnull Map<String, AttributeMap> getAttributeValues(Collection<String> csids, Collection<String> attributeNames)
This method is deprecated. in 3.4 for removal in 4.0. Use getProperties(Iterable, Iterable) instead.
IndexedChangeset getChangeset(String csid)
Retrieves the IndexedChangeset with id = csid
boolean isMemberOf(String changesetId, Repository repository)
@Deprecated void removeAttribute(String csid, String name, String value)
This method is deprecated. in 3.4 for removal in 4.0. Use removeProperty(String, String, String) instead.
void removeChangeset(String csid, Repository repository)
Unregisters a changeset as being present in a repository.
@Nonnull Page<IndexedChangeset> search(IndexSearchRequest searchRequest, PageRequest pageRequest)
Search the index for any matching changesets.

Public Methods

@Deprecated public void addAttribute (String csid, String name, String value)

This method is deprecated.
in 3.4 for removal in 4.0. Use addProperty(String, String, String) instead

Stores a changeset attribute. If the attribute (name-value pair) already exists, calling this method will have no effect.

Parameters
csid the changeset id
name the attribute name
value the attribute value

public void addChangeset (Changeset changeset, Repository repository)

Associates the provided Changeset with the specified Repository.

Parameters
changeset the changeset
repository the repository

@Deprecated @Nonnull public Changeset enrichChangeset (Changeset changeset, Repository repository, Collection<String> attributeNames)

This method is deprecated.
in 2.12 for removal in 4.0. Use CommitEnricher, which applies other useful attributes in addition to index data, instead.

Enriches the provided Changeset by applying attributes from the index.

In addition to any explicitly requested attributes, plugins can define attributes to automatically preload. For example, JIRA issue keys are automatically preloaded if a JIRA server has been linked to the instance. As a result, the attributeNames collection may be null or empty and one or more attributes may still be loaded.

Parameters
changeset the changeset to enrich by adding attributes
repository the repository associated with the request, to allow retrieving configuration for attributes to preload
attributeNames a collection containing zero or more attribute names to explicitly load, in addition to any attributes configured for preloading, or null to only load configured preload attributes
Returns
  • the enriched changeset

@Deprecated @Nonnull public Page<Changeset> enrichChangesets (Page<Changeset> changesets, Repository repository, Collection<String> attributeNames)

This method is deprecated.
in 2.12 for removal in 4.0. Use CommitEnricher, which applies other useful attributes in addition to index data, instead.

Enriches each Changeset on the provided Page by applying attributes from the index.

In addition to any explicitly requested attributes, plugins can define attributes to automatically preload. For example, JIRA issue keys are automatically preloaded if a JIRA server has been linked to the instance. As a result, the attributeNames collection may be null or empty and one or more attributes may still be loaded.

Parameters
changesets a page containing one or more changesets to enrich
repository the repository associated with the request, to allow retrieving configuration for attributes to preload
attributeNames a collection containing zero or more attribute names to explicitly load, in addition to any attributes configured for preloading, or null to only load configured preload attributes
Returns
  • a new page containing the enriched changesets

@Deprecated @Nonnull public Page<IndexedChangeset> findChangesetsByAttribute (String attributeName, String attributeValue, boolean caseSensitive, PageRequest pageRequest)

This method is deprecated.
in 3.4 for removal in 4.0. Use findByProperty(String, String, boolean, PageRequest) instead

Retrieves all indexed changesets that have a given attribute with a specified value.

Parameters
attributeName the attribute name
attributeValue the attribute value
caseSensitive whether matches against value should be case-sensitive
Returns
  • a page of indexedchangeset that have the provided attribute. The results in the page are ordered by authorTimestamp descending

@Deprecated @Nonnull public AttributeMap getAttributeValues (String csid, Collection<String> attributeNames)

This method is deprecated.
in 3.4 for removal in 4.0. Use getProperties(String, Iterable) instead.

Retrieves values for the named attributes for the specified changeset.

Parameters
csid the changeset id
attributeNames the attribute name
Returns
  • all values for attributes in attributeNames for changeset csid. Can be empty, but not null.

@Deprecated @Nonnull public Map<String, AttributeMap> getAttributeValues (Collection<String> csids, Collection<String> attributeNames)

This method is deprecated.
in 3.4 for removal in 4.0. Use getProperties(Iterable, Iterable) instead.

Retrieves values for the named attributes for each of the specified changesets, returning a map pairing each changeset with its loaded attributes.

Parameters
csids a collection of changeset ids
attributeNames the attribute name
Returns
  • all values for attributes in attributeNames for all the changesets in csids. Can be empty, but not null.

public IndexedChangeset getChangeset (String csid)

Retrieves the IndexedChangeset with id = csid

Parameters
csid the changeset id
Returns
  • the IndexedChangeset, or null if no such changeset exists in the index

public boolean isMemberOf (String changesetId, Repository repository)

Parameters
changesetId the changeset id
repository the repository
Returns
  • true if the provided changeset is (indexed as) a member of repository

@Deprecated public void removeAttribute (String csid, String name, String value)

This method is deprecated.
in 3.4 for removal in 4.0. Use removeProperty(String, String, String) instead.

Removes a changeset attribute.

Parameters
csid the changeset id
name the attribute name
value the attribute value

public void removeChangeset (String csid, Repository repository)

Unregisters a changeset as being present in a repository.

Parameters
csid the changeset id
repository the repository

@Nonnull public Page<IndexedChangeset> search (IndexSearchRequest searchRequest, PageRequest pageRequest)

Search the index for any matching changesets.

Parameters
searchRequest the criteria to match
pageRequest a pageRequest to delimit the search
Returns
  • a page of IndexedChangeset, possibly empty if no changeset in the index matches