Interface GroupConfigurationProvider
-
public interface GroupConfigurationProviderThis class provides access to the groups of the cloud (groups.json file).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddGroupConfiguration(@NotNull GroupConfiguration groupConfiguration)Adds a new group to the cloud@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>addGroupConfigurationAsync(@NotNull GroupConfiguration groupConfiguration)Adds a new group to the cloud@Nullable GroupConfigurationgetGroupConfiguration(@NotNull java.lang.String name)Gets a specific group by its name@NotNull de.dytanic.cloudnet.common.concurrent.ITask<GroupConfiguration>getGroupConfigurationAsync(@NotNull java.lang.String name)Gets a specific group by its namejava.util.Collection<GroupConfiguration>getGroupConfigurations()Gets all groups that are registered in the cloud@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<GroupConfiguration>>getGroupConfigurationsAsync()Gets all groups that are registered in the cloudbooleanisGroupConfigurationPresent(@NotNull java.lang.String name)Checks whether the group with a specific name exists@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>isGroupConfigurationPresentAsync(@NotNull java.lang.String name)Checks whether the group with a specific name existsvoidreload()Reloads the groups.json file@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>reloadAsync()Reloads the groups.json filevoidremoveGroupConfiguration(@NotNull GroupConfiguration groupConfiguration)Removes a group from the cloudvoidremoveGroupConfiguration(@NotNull java.lang.String name)Removes a group from the cloud@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>removeGroupConfigurationAsync(@NotNull GroupConfiguration groupConfiguration)Removes a group from the cloud@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>removeGroupConfigurationAsync(@NotNull java.lang.String name)Removes a group from the cloudvoidsetGroupConfigurations(@NotNull java.util.Collection<GroupConfiguration> groupConfigurations)Clears all existing groups and sets the given collection as the new groups@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void>setGroupConfigurationsAsync(@NotNull java.util.Collection<GroupConfiguration> groupConfigurations)Clears all existing groups and sets the given collection as the new groups
-
-
-
Method Detail
-
reload
void reload()
Reloads the groups.json file
-
getGroupConfigurations
java.util.Collection<GroupConfiguration> getGroupConfigurations()
Gets all groups that are registered in the cloud- Returns:
- a list containing the group configurations of all groups
-
setGroupConfigurations
void setGroupConfigurations(@NotNull @NotNull java.util.Collection<GroupConfiguration> groupConfigurations)Clears all existing groups and sets the given collection as the new groups- Parameters:
groupConfigurations- the new groups
-
getGroupConfiguration
@Nullable @Nullable GroupConfiguration getGroupConfiguration(@NotNull @NotNull java.lang.String name)
Gets a specific group by its name- Parameters:
name- the name of the group- Returns:
- the group or
nullif no group with that name exists
-
isGroupConfigurationPresent
boolean isGroupConfigurationPresent(@NotNull @NotNull java.lang.String name)Checks whether the group with a specific name exists- Parameters:
name- the name of the group- Returns:
trueif the group exists orfalseotherwise
-
addGroupConfiguration
void addGroupConfiguration(@NotNull @NotNull GroupConfiguration groupConfiguration)Adds a new group to the cloud- Parameters:
groupConfiguration- the group to be added
-
removeGroupConfiguration
void removeGroupConfiguration(@NotNull @NotNull java.lang.String name)Removes a group from the cloud- Parameters:
name- the name of the group to be removed
-
removeGroupConfiguration
void removeGroupConfiguration(@NotNull @NotNull GroupConfiguration groupConfiguration)Removes a group from the cloud- Parameters:
groupConfiguration- the group to be removed (the only thing that matters in this object is the name, the rest is ignored)
-
reloadAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> reloadAsync()
Reloads the groups.json file
-
getGroupConfigurationsAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<GroupConfiguration>> getGroupConfigurationsAsync()
Gets all groups that are registered in the cloud- Returns:
- a list containing the group configurations of all groups
-
setGroupConfigurationsAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> setGroupConfigurationsAsync(@NotNull @NotNull java.util.Collection<GroupConfiguration> groupConfigurations)Clears all existing groups and sets the given collection as the new groups- Parameters:
groupConfigurations- the new groups
-
getGroupConfigurationAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<GroupConfiguration> getGroupConfigurationAsync(@NotNull @NotNull java.lang.String name)
Gets a specific group by its name- Parameters:
name- the name of the group- Returns:
- the group or
nullif no group with that name exists
-
isGroupConfigurationPresentAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> isGroupConfigurationPresentAsync(@NotNull @NotNull java.lang.String name)Checks whether the group with a specific name exists- Parameters:
name- the name of the group- Returns:
trueif the group exists orfalseotherwise
-
addGroupConfigurationAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> addGroupConfigurationAsync(@NotNull @NotNull GroupConfiguration groupConfiguration)Adds a new group to the cloud- Parameters:
groupConfiguration- the group to be added
-
removeGroupConfigurationAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> removeGroupConfigurationAsync(@NotNull @NotNull java.lang.String name)Removes a group from the cloud- Parameters:
name- the name of the group to be removed
-
removeGroupConfigurationAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Void> removeGroupConfigurationAsync(@NotNull @NotNull GroupConfiguration groupConfiguration)Removes a group from the cloud- Parameters:
groupConfiguration- the group to be removed (the only thing that matters in this object is the name, the rest is ignored)
-
-