Package org.javacord.core.entity.channel
Class RegularServerChannelImpl
- java.lang.Object
-
- org.javacord.core.entity.channel.ServerChannelImpl
-
- org.javacord.core.entity.channel.RegularServerChannelImpl
-
- All Implemented Interfaces:
java.lang.Comparable<RegularServerChannel>
,java.util.Formattable
,Channel
,ChannelSpecialization
,RegularServerChannel
,ServerChannel
,Deletable
,DiscordEntity
,Nameable
,Updatable
,UpdatableFromCache
,ChannelAttachableListenerManager
,ServerChannelAttachableListenerManager
,Specializable<ChannelSpecialization>
,InternalChannelAttachableListenerManager
,InternalServerChannelAttachableListenerManager
- Direct Known Subclasses:
ChannelCategoryImpl
,ServerForumChannelImpl
,ServerTextChannelImpl
,ServerVoiceChannelImpl
,UnknownRegularServerChannelImpl
public class RegularServerChannelImpl extends ServerChannelImpl implements RegularServerChannel
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<RegularServerChannel>
COMPARE_BY_RAW_POSITION
Compares channels according to their "position" field and, if those are the same, their id.
-
Constructor Summary
Constructors Constructor Description RegularServerChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server channel object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Permissions
getEffectiveOverwrittenPermissions(User user)
java.util.concurrent.ConcurrentHashMap<java.lang.Long,Permissions>
getInternalOverwrittenRolePermissions()
Gets the overwritten role permissions.java.util.concurrent.ConcurrentHashMap<java.lang.Long,Permissions>
getInternalOverwrittenUserPermissions()
Gets the overwritten user permissions.<T extends Permissionable & DiscordEntity>
PermissionsgetOverwrittenPermissions(T permissionable)
java.util.Map<java.lang.Long,Permissions>
getOverwrittenRolePermissions()
java.util.Map<java.lang.Long,Permissions>
getOverwrittenUserPermissions()
int
getRawPosition()
void
setRawPosition(int position)
Sets the raw position of the channel.-
Methods inherited from class org.javacord.core.entity.channel.ServerChannelImpl
delete, equals, getApi, getId, getInvites, getName, getServer, getType, hashCode, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.entity.channel.Channel
asCategorizable, asChannelCategory, asPrivateChannel, asRegularServerChannel, asServerChannel, asServerForumChannel, asServerStageVoiceChannel, asServerTextChannel, asServerThreadChannel, asServerVoiceChannel, asTextableRegularServerChannel, asTextChannel, asVoiceChannel, canSee, canYouSee, getType
-
Methods inherited from interface org.javacord.api.entity.Deletable
delete, delete, deleteAfter, deleteAfter, deleteAfter, deleteAfter, getApi
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, 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, addVoiceStateUpdateListener, getServerChannelAttachableListeners, getServerChannelChangeNameListeners, getServerChannelChangeOverwrittenPermissionsListeners, getServerChannelChangePositionListeners, getServerChannelDeleteListeners, getVoiceStateUpdateListeners, removeListener, removeServerChannelAttachableListener
-
Methods inherited from interface org.javacord.api.entity.channel.RegularServerChannel
canCreateInstantInvite, canYouCreateInstantInvite, compareTo, createUpdater, getCurrentCachedInstance, getEffectiveAllowedPermissions, getEffectiveDeniedPermissions, getEffectivePermissions, getLatestInstance, getOverwrittenPermissions, getPosition, hasAnyPermission, hasPermission, hasPermissions, updateRawPosition
-
Methods inherited from interface org.javacord.api.entity.channel.ServerChannel
createInviteBuilder, getInvites, getServer, updateName
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Field Detail
-
COMPARE_BY_RAW_POSITION
public static final java.util.Comparator<RegularServerChannel> COMPARE_BY_RAW_POSITION
Compares channels according to their "position" field and, if those are the same, their id.
-
-
Constructor Detail
-
RegularServerChannelImpl
public RegularServerChannelImpl(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
-
getInternalOverwrittenRolePermissions
public java.util.concurrent.ConcurrentHashMap<java.lang.Long,Permissions> getInternalOverwrittenRolePermissions()
Gets the overwritten role permissions.- Returns:
- The overwritten role permissions.
-
getInternalOverwrittenUserPermissions
public java.util.concurrent.ConcurrentHashMap<java.lang.Long,Permissions> getInternalOverwrittenUserPermissions()
Gets the overwritten user permissions.- Returns:
- The overwritten user permissions.
-
getOverwrittenPermissions
public <T extends Permissionable & DiscordEntity> Permissions getOverwrittenPermissions(T permissionable)
- Specified by:
getOverwrittenPermissions
in interfaceRegularServerChannel
-
getOverwrittenUserPermissions
public java.util.Map<java.lang.Long,Permissions> getOverwrittenUserPermissions()
- Specified by:
getOverwrittenUserPermissions
in interfaceRegularServerChannel
-
getOverwrittenRolePermissions
public java.util.Map<java.lang.Long,Permissions> getOverwrittenRolePermissions()
- Specified by:
getOverwrittenRolePermissions
in interfaceRegularServerChannel
-
getEffectiveOverwrittenPermissions
public Permissions getEffectiveOverwrittenPermissions(User user)
- Specified by:
getEffectiveOverwrittenPermissions
in interfaceRegularServerChannel
-
getRawPosition
public int getRawPosition()
- Specified by:
getRawPosition
in interfaceRegularServerChannel
-
setRawPosition
public void setRawPosition(int position)
Sets the raw position of the channel.- Parameters:
position
- The new raw position of the channel.
-
-