public class Token extends java.lang.Object implements Identifiable
Constructor and Description |
---|
Token() |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(Channel channelIn)
Add a channel to this Token
|
void |
addEntitlement(ServerGroupType sgtIn)
Add a server group type to the set of entitlements
|
void |
addPackage(PackageName packageNameIn,
PackageArch packageArchIn)
Add a package to this Token using the PackageName given.
|
void |
addPackage(TokenPackage packageIn)
Add a package to this Token
|
void |
addServerGroup(ManagedServerGroup serverGroupIn)
Add a ServerGroup to this Token
|
void |
clearChannels()
Clear all channels associated with this token.
|
void |
clearConfigChannels()
Removes all the config channels associated to this activation key.
|
void |
clearEntitlements()
Removes all system entitlements associtated to this activation key.
|
void |
clearPackages()
Clear all packages associated with this token.
|
void |
disable()
Convenience method to make this field more sensible
Sets the disabled attribute to 1
|
void |
enable()
Convenience method to set the disabled
attribute to 0
|
boolean |
equals(java.lang.Object other) |
java.util.Set<Server> |
getActivatedServers() |
Channel |
getBaseChannel()
Returns the base channel associated to this token
|
java.util.Set<Channel> |
getChannels() |
protected java.util.List |
getConfigChannels() |
java.util.List<ConfigChannel> |
getConfigChannelsFor(User user)
Returns the config channels associated to this activation key
It requires User info for credential checking..
|
User |
getCreator() |
boolean |
getDeployConfigs() |
java.lang.Long |
getDisabled() |
java.util.Set<ServerGroupType> |
getEntitlements() |
java.lang.Long |
getId()
Get the database id of this Object.
|
java.lang.String |
getNote() |
Org |
getOrg() |
java.util.Set<TokenPackage> |
getPackages() |
Server |
getServer() |
java.util.Set<ServerGroup> |
getServerGroups() |
java.lang.Long |
getUsageLimit() |
int |
hashCode() |
boolean |
isOrgDefault()
Returns true if this token is the org default.
|
boolean |
isTokenDisabled()
Convenience method to make this field more sensible
|
void |
removeChannel(Channel channelIn)
Remove a channel from this Token
|
void |
removeEntitlement(ServerGroupType sgtIn)
Remove a server group type from the set of entitlements
|
void |
removePackage(PackageName packageNameIn,
PackageArch packageArchIn)
Remove a PackageName from this Token
|
void |
removePackage(TokenPackage packageIn)
Remove a package from this Token
|
void |
removeServerGroup(ServerGroup serverGroupIn)
Remove a ServerGroup from this Token
|
protected void |
setActivatedServers(java.util.Set<Server> servers) |
void |
setBaseChannel(Channel channel)
Updates the base channel associated to this token.
|
void |
setChannels(java.util.Set channelsIn) |
protected void |
setConfigChannels(java.util.List cfgChannels)
This method should only be called by hibernate..!
|
void |
setCreator(User u) |
void |
setDeployConfigs(boolean d) |
void |
setDisabled(java.lang.Long d) |
void |
setEntitlements(java.util.Set entitlementsIn) |
void |
setId(java.lang.Long i) |
void |
setNote(java.lang.String n) |
void |
setOrg(Org o) |
void |
setOrgDefault(boolean orgDefault)
Sets this token as the universal default.
|
void |
setPackages(java.util.Set packagesIn) |
void |
setServer(Server s) |
void |
setServerGroups(java.util.Set serverGroupsIn) |
void |
setUsageLimit(java.lang.Long u) |
public java.util.Set<ServerGroupType> getEntitlements()
public void setEntitlements(java.util.Set entitlementsIn)
entitlementsIn
- The entitlements to set.public void addEntitlement(ServerGroupType sgtIn)
sgtIn
- The server group type to add.public void removeEntitlement(ServerGroupType sgtIn)
sgtIn
- The server group type to remove.public void clearEntitlements()
public boolean getDeployConfigs()
public void setDeployConfigs(boolean d)
d
- The deployConfigs to set.public boolean isTokenDisabled()
public void disable()
public void enable()
public java.lang.Long getDisabled()
public void setDisabled(java.lang.Long d)
d
- The disabled to set.public java.lang.Long getId()
Identifiable
getId
in interface Identifiable
public void setId(java.lang.Long i)
i
- The id to set.public java.lang.String getNote()
public void setNote(java.lang.String n)
n
- The note to set.public Org getOrg()
public void setOrg(Org o)
o
- The org to set.public Server getServer()
public void setServer(Server s)
s
- The server to set.public java.lang.Long getUsageLimit()
public void setUsageLimit(java.lang.Long u)
u
- The usageLimit to set.public User getCreator()
public void setCreator(User u)
u
- The user to set.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Set<Channel> getChannels()
public void setChannels(java.util.Set channelsIn)
channelsIn
- The channels to set.public void clearChannels()
public void addChannel(Channel channelIn)
channelIn
- to addpublic void removeChannel(Channel channelIn)
channelIn
- to removepublic java.util.Set<ServerGroup> getServerGroups()
public void setServerGroups(java.util.Set serverGroupsIn)
serverGroupsIn
- The server groups to set.public void addServerGroup(ManagedServerGroup serverGroupIn)
serverGroupIn
- Server group to addpublic void removeServerGroup(ServerGroup serverGroupIn)
serverGroupIn
- Server group to removepublic void addPackage(PackageName packageNameIn, PackageArch packageArchIn)
packageNameIn
- PackageName to addpackageArchIn
- PackageArch to addpublic void removePackage(PackageName packageNameIn, PackageArch packageArchIn)
packageNameIn
- Package name to removepackageArchIn
- Package arch to remove (optional)public void addPackage(TokenPackage packageIn)
packageIn
- package to addpublic void removePackage(TokenPackage packageIn)
packageIn
- package to removepublic java.util.Set<TokenPackage> getPackages()
public void setPackages(java.util.Set packagesIn)
packagesIn
- The packages to set.public void clearPackages()
public java.util.Set<Server> getActivatedServers()
protected void setActivatedServers(java.util.Set<Server> servers)
servers
- the activated servers to set.protected java.util.List getConfigChannels()
protected void setConfigChannels(java.util.List cfgChannels)
cfgChannels
- the configChannels to setpublic java.util.List<ConfigChannel> getConfigChannelsFor(User user)
user
- the User object needed for access credentialspublic void clearConfigChannels()
public Channel getBaseChannel()
public void setBaseChannel(Channel channel)
channel
- sets the base channel of this token.public boolean isOrgDefault()
public void setOrgDefault(boolean orgDefault)
orgDefault
- true if this activation key is the org default.