package ru.tehkode.permissions;

import org.bukkit.entity.Player;

import java.util.*;
import java.util.concurrent.ScheduledExecutorService;
import java.util.logging.Logger;

public abstract class PermissionManager {
	public abstract boolean shouldCreateUserRecords();

	public abstract boolean has(Player player, String permission);

	public abstract boolean has(Player player, String permission, String world);

	public abstract boolean has(String playerName, String permission, String world);

	public abstract boolean has(UUID playerId, String permission, String world);

	public abstract PermissionUser getUser(String username);

	public abstract void cacheUser(String ident, String fallbackName);

	public abstract PermissionUser getUser(Player player);

	public abstract PermissionUser getUser(UUID uid);

	public abstract Set<PermissionUser> getUsers();

	public abstract Set<PermissionUser> getActiveUsers();

	public abstract Collection<String> getUserIdentifiers();

	public abstract Collection<String> getUserNames();

	public abstract Set<PermissionUser> getUsers(String groupName, String worldName);

	public abstract Set<PermissionUser> getUsers(String groupName);

	public abstract Set<PermissionUser> getUsers(String groupName, String worldName, boolean inheritance);

	public abstract Set<PermissionUser> getUsers(String groupName, boolean inheritance);

	public abstract void resetUser(String userName);

	public abstract void resetUser(Player ply);

	public abstract void clearUserCache(String userName);

	public abstract void clearUserCache(UUID uid);

	public abstract void clearUserCache(Player player);

	public abstract PermissionGroup getGroup(String groupname);

	public abstract List<PermissionGroup> getGroupList();

	@Deprecated
	public abstract PermissionGroup[] getGroups();

	public abstract List<PermissionGroup> getGroups(String groupName, String worldName);

	public abstract List<PermissionGroup> getGroups(String groupName);

	public abstract List<PermissionGroup> getGroups(String groupName, String worldName, boolean inheritance);

	public abstract List<PermissionGroup> getGroups(String groupName, boolean inheritance);

	public abstract List<PermissionGroup> getDefaultGroups(String worldName);

	public abstract PermissionGroup resetGroup(String groupName);

	public abstract void setDebug(boolean debug);

	public abstract boolean isDebug();

	public abstract Map<Integer, PermissionGroup> getRankLadder(String ladderName);

	public abstract List<String> getWorldInheritance(String worldName);

	public abstract void setWorldInheritance(String world, List<String> parentWorlds);

	public abstract void end();

	public abstract void initTimer();

	public abstract Collection<String> getGroupNames();

	public abstract Logger getLogger();

	public abstract ScheduledExecutorService getExecutor();
}
