Package org.javacord.core.entity.channel
Class ServerChannelImpl
- java.lang.Object
-
- org.javacord.core.entity.channel.ServerChannelImpl
-
- All Implemented Interfaces:
Comparable<T>
,Formattable
,Channel
,ChannelSpecialization
,ServerChannel
,DiscordEntity
,Nameable
,Updatable<T>
,UpdatableFromCache
,ChannelAttachableListenerManager
,ServerChannelAttachableListenerManager
,Specializable<T>
,InternalChannelAttachableListenerManager
,InternalServerChannelAttachableListenerManager
- Direct Known Subclasses:
ChannelCategoryImpl
,ServerTextChannelImpl
,ServerVoiceChannelImpl
public abstract class ServerChannelImpl extends Object implements ServerChannel, InternalServerChannelAttachableListenerManager
The implementation ofServerChannel
.
-
-
Constructor Summary
Constructors Constructor Description ServerChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server channel object.
-
Method Summary
-
Methods inherited from interface org.javacord.api.entity.channel.Channel
asCategorizable, asChannelCategory, asGroupChannel, asPrivateChannel, asServerChannel, asServerTextChannel, asServerVoiceChannel, asTextChannel, asVoiceChannel, canSee, canYouSee, getType
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getCreationTimestamp, getCreationTimestamp, getIdAsString
-
Methods inherited from interface org.javacord.core.listener.channel.InternalChannelAttachableListenerManager
addChannelAttachableListener, getChannelAttachableListeners, removeChannelAttachableListener, removeListener
-
Methods inherited from interface org.javacord.core.listener.channel.server.InternalServerChannelAttachableListenerManager
addServerChannelAttachableListener, addServerChannelChangeNameListener, addServerChannelChangeOverwrittenPermissionsListener, addServerChannelChangePositionListener, addServerChannelDeleteListener, getServerChannelAttachableListeners, getServerChannelChangeNameListeners, getServerChannelChangeOverwrittenPermissionsListeners, getServerChannelChangePositionListeners, getServerChannelDeleteListeners, removeListener, removeServerChannelAttachableListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.entity.channel.ServerChannel
canCreateInstantInvite, canYouCreateInstantInvite, compareTo, createInviteBuilder, createUpdater, delete, getCurrentCachedInstance, getEffectiveAllowedPermissions, getEffectiveDeniedPermissions, getEffectivePermissions, getLatestInstance, getOverwrittenPermissions, getPosition, hasAnyPermission, hasPermission, hasPermissions, updateName, updateRawPosition
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Constructor Detail
-
ServerChannelImpl
public ServerChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server channel object.- Parameters:
api
- The discord api instance.server
- The server of the channel.data
- The json data of the channel.
-
-
Method Detail
-
setName
public void setName(String name)
Sets the name of the channel.- Parameters:
name
- The new name of the channel.
-
setPosition
public void setPosition(int position)
Sets the position of the channel.- Parameters:
position
- The new position of the channel.
-
getInternalOverwrittenRolePermissions
public ConcurrentHashMap<Long,Permissions> getInternalOverwrittenRolePermissions()
Gets the overwritten role permissions.- Returns:
- The overwritten role permissions.
-
getInternalOverwrittenUserPermissions
public ConcurrentHashMap<Long,Permissions> getInternalOverwrittenUserPermissions()
Gets the overwritten user permissions.- Returns:
- The overwritten user permissions.
-
getApi
public DiscordApi getApi()
Description copied from interface:InternalServerChannelAttachableListenerManager
Gets the discord api instance.- Specified by:
getApi
in interfaceDiscordEntity
- Specified by:
getApi
in interfaceInternalChannelAttachableListenerManager
- Specified by:
getApi
in interfaceInternalServerChannelAttachableListenerManager
- Returns:
- The discord api instance.
-
getId
public long getId()
Description copied from interface:InternalServerChannelAttachableListenerManager
Gets the id of this object.- Specified by:
getId
in interfaceDiscordEntity
- Specified by:
getId
in interfaceInternalChannelAttachableListenerManager
- Specified by:
getId
in interfaceInternalServerChannelAttachableListenerManager
- Returns:
- The id of this object.
-
getServer
public Server getServer()
- Specified by:
getServer
in interfaceServerChannel
-
getRawPosition
public int getRawPosition()
- Specified by:
getRawPosition
in interfaceServerChannel
-
getInvites
public CompletableFuture<Collection<RichInvite>> getInvites()
- Specified by:
getInvites
in interfaceServerChannel
-
getOverwrittenPermissions
public <T extends Permissionable & DiscordEntity> Permissions getOverwrittenPermissions(T permissionable)
- Specified by:
getOverwrittenPermissions
in interfaceServerChannel
-
getOverwrittenUserPermissions
public Map<User,Permissions> getOverwrittenUserPermissions()
- Specified by:
getOverwrittenUserPermissions
in interfaceServerChannel
-
getOverwrittenRolePermissions
public Map<Role,Permissions> getOverwrittenRolePermissions()
- Specified by:
getOverwrittenRolePermissions
in interfaceServerChannel
-
getEffectiveOverwrittenPermissions
public Permissions getEffectiveOverwrittenPermissions(User user)
- Specified by:
getEffectiveOverwrittenPermissions
in interfaceServerChannel
-
delete
public CompletableFuture<Void> delete(String reason)
- Specified by:
delete
in interfaceServerChannel
-
-