Class Group
java.lang.Object
org.opengrok.indexer.configuration.Group
- All Implemented Interfaces:
Comparable<Group>
,Nameable
Placeholder for the information about subgroups of projects and repositories.
Supports natural ordering based on case insensitive group names.
- Version:
- $Revision$
- Author:
- Krystof Tulinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
int
boolean
Collect all group's projects and repositories included in this group and in any subgroup.static @Nullable Group
Returns group object by its name.int
getFlag()
getName()
Collect all related groups to this group.int
hashCode()
boolean
Test group for a match.boolean
Test group for a match.Reduce the group set to only those which match the given project based on the project's description.void
void
setDescendants
(Set<Group> descendants) void
setFlag
(int flag) void
void
final void
setPattern
(String pattern) Set the group pattern.void
setProjects
(Set<Project> projects) void
setRepositories
(Set<Project> repositories) void
setSubgroups
(Set<Group> subgroups)
-
Constructor Details
-
Group
public Group()No-arg constructor is needed for deserialization. -
Group
-
Group
-
-
Method Details
-
getProjects
-
addProject
-
addRepository
-
getDescendants
-
setDescendants
-
addDescendant
-
removeDescendant
-
getRepositories
-
setSubgroups
-
setProjects
-
setRepositories
-
getSubgroups
-
addGroup
-
getParents
-
getRelatedGroups
Collect all related groups to this group. A related group is- any ancestor
- any subgroup
- Returns:
- all collected related groups to this group
-
getAllProjects
Collect all group's projects and repositories included in this group and in any subgroup.- Returns:
- all collected projects and repositories
-
getParent
-
setParent
-
getName
-
setName
-
getPattern
-
setPattern
Set the group pattern.- Parameters:
pattern
- the regexp pattern for this group- Throws:
PatternSyntaxException
- when the pattern is invalid
-
getFlag
public int getFlag() -
setFlag
public void setFlag(int flag) -
match
Test group for a match.- Parameters:
p
- project- Returns:
- true if project's name matches the group pattern
-
match
Test group for a match.- Parameters:
name
- string to match- Returns:
- true if given name matches the group pattern
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Group>
-
hashCode
public int hashCode() -
equals
-
getByName
Returns group object by its name.- Parameters:
name
- name of a group- Returns:
- group that fits the name
-
matching
Reduce the group set to only those which match the given project based on the project's description.- Parameters:
project
- the projectgroups
- set of groups- Returns:
- set of groups matching the project
-