Package io.manebot.database.model
Class Platform
- java.lang.Object
-
- io.manebot.database.model.TimedRow
-
- io.manebot.database.model.Platform
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.manebot.platform.Platform
Platform.Builder
-
-
Method Summary
Modifier and Type Method Description Group
getDefaultGroup()
Gets the default group assignment for users registered on this platform.java.lang.String
getId()
Gets the platform's internal unique ID.int
getPlatformId()
Plugin
getPlugin()
Gets the current plugin instance for this platform.PlatformRegistration
getRegistration()
Gets the runtime registration associated with this platform.UserAssociation
getUserAssocation(java.lang.String id)
Gets a specific assocation for this platform.java.util.Collection<UserAssociation>
getUserAssociations()
Gets a list of user associations for this platform.java.util.Collection<UserAssociation>
getUserAssociations(User user)
Gets a set of user associations for the specified user.int
hashCode()
boolean
isRegistrationAllowed()
Finds if registration is allowed.void
setDefaultGroup(UserGroup defaultGroup)
Sets the default group assignment for users registered on this platform.void
setRegistration(PlatformRegistration registration)
void
setRegistrationAllowed(boolean allowed)
Sets if registration is allowed on this platform.-
Methods inherited from class io.manebot.database.model.TimedRow
getCreated, getCreatedDate, getUpdated, getUpdatedDate, setCreated, setCreated, setCreatedDate, setUpdated, setUpdated, setUpdatedDate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.manebot.platform.Platform
getConnection, getUserAssocation, isConnected
-
-
-
-
Method Detail
-
getPlatformId
public int getPlatformId()
-
getRegistration
public PlatformRegistration getRegistration()
Description copied from interface:Platform
Gets the runtime registration associated with this platform.- Specified by:
getRegistration
in interfacePlatform
- Returns:
- Platform runtime registration.
-
getId
public java.lang.String getId()
Description copied from interface:Platform
Gets the platform's internal unique ID.
-
isRegistrationAllowed
public boolean isRegistrationAllowed()
Description copied from interface:Platform
Finds if registration is allowed.- Specified by:
isRegistrationAllowed
in interfacePlatform
- Returns:
- true if registration is allowed, false otherwise.
-
setRegistrationAllowed
public void setRegistrationAllowed(boolean allowed)
Description copied from interface:Platform
Sets if registration is allowed on this platform.- Specified by:
setRegistrationAllowed
in interfacePlatform
- Parameters:
allowed
- true if registration is allowed, false otherwise.
-
getUserAssocation
public UserAssociation getUserAssocation(java.lang.String id)
Description copied from interface:Platform
Gets a specific assocation for this platform.- Specified by:
getUserAssocation
in interfacePlatform
- Parameters:
id
- Platform-specific user ID to search for.- Returns:
- user association if found on this platform, null otherwise.
-
getUserAssociations
public java.util.Collection<UserAssociation> getUserAssociations(User user)
Description copied from interface:Platform
Gets a set of user associations for the specified user.- Specified by:
getUserAssociations
in interfacePlatform
- Parameters:
user
- User to search for.- Returns:
- collection of user associations for the specified uesr.
-
getUserAssociations
public java.util.Collection<UserAssociation> getUserAssociations()
Description copied from interface:Platform
Gets a list of user associations for this platform.- Specified by:
getUserAssociations
in interfacePlatform
- Returns:
- collection of user associations.
-
getPlugin
public Plugin getPlugin()
Description copied from interface:Platform
Gets the current plugin instance for this platform.
-
setRegistration
public void setRegistration(PlatformRegistration registration)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getDefaultGroup
public Group getDefaultGroup()
Description copied from interface:Platform
Gets the default group assignment for users registered on this platform.- Specified by:
getDefaultGroup
in interfacePlatform
- Returns:
- Platform default user group, or null if no default is assigned.
-
setDefaultGroup
public void setDefaultGroup(UserGroup defaultGroup)
Description copied from interface:Platform
Sets the default group assignment for users registered on this platform.- Specified by:
setDefaultGroup
in interfacePlatform
- Parameters:
defaultGroup
- default user group for newly registered users.
-
-