public class ActivationKey extends BaseDomainHelper
Constructor and Description |
---|
ActivationKey() |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(Channel channelIn)
Add a Channel to this ActivationKey
|
void |
addEntitlement(ServerGroupType entitlementIn) |
void |
addPackage(PackageName packageNameIn,
PackageArch packageArchIn)
Add a package to this ActivationKey using PackageName only
|
void |
addServerGroup(ManagedServerGroup serverGroupIn)
Add a ServerGroup to this ActivationKey
|
void |
clearChannels()
Clear all channels associated with this token.
|
void |
clearConfigChannels()
Clear all config channel associated with this activation key.
|
void |
clearPackages()
Clear all packages associated with this activation key.
|
Channel |
getBaseChannel()
Return the base channel or null if none exists
|
java.util.Set<Channel> |
getChannels()
Get the Set of Channels associated with this ActivationKey
|
java.util.List<ConfigChannel> |
getConfigChannelsFor(User user)
Returns the config channels associated to this activation key
Throws a LookupException if the user does NOT have permissson to
access/deal with these channels.
|
User |
getCreator() |
boolean |
getDeployConfigs() |
java.util.Set<ServerGroupType> |
getEntitlements() |
java.lang.Long |
getId() |
java.lang.String |
getKey() |
KickstartSession |
getKickstartSession() |
java.lang.String |
getNote() |
Org |
getOrg() |
java.util.Set<TokenPackage> |
getPackages()
Get the Set of TokenPackage objects associated with this ActivationKey
|
Server |
getServer() |
java.util.Set<ServerGroup> |
getServerGroups()
Get the Set of ServerGroup objects associated with this ActivationKey
|
Token |
getToken() |
java.lang.Long |
getUsageLimit() |
boolean |
isDisabled() |
boolean |
isUniversalDefault()
Returns true if this token is the org default.
|
static java.lang.String |
makePrefix(Org org)
Makes the Activation key prefix that will get
added to the base key
|
void |
removeChannel(Channel channelIn)
Remove a Channel from this ActivationKey
|
void |
removeEntitlement(ServerGroupType entitlementIn) |
void |
removePackage(PackageName packageNameIn,
PackageArch packageArchIn)
Remove packages from the ActivationKey that match the PackageName
and PackageArch given.
|
void |
removeServerGroup(ServerGroup serverGroupIn)
Remove a ServerGroup from this ActivationKey
|
static java.lang.String |
sanitize(Org org,
java.lang.String key)
Helper method to return a santized activation key name
|
void |
setBaseChannel(Channel chan)
sets the base channel..
|
void |
setChannels(java.util.Set channelsIn)
Set the Set of Channels associated with this ActivationKey
|
void |
setCreator(User user) |
void |
setDeployConfigs(boolean b) |
void |
setDisabled(java.lang.Boolean disabled) |
void |
setEntitlements(java.util.Set entitlementsIn) |
void |
setId(java.lang.Long id) |
void |
setKey(java.lang.String keyIn) |
void |
setKickstartSession(KickstartSession kickstartSessionIn) |
void |
setNote(java.lang.String note) |
void |
setOrg(Org org) |
void |
setPackages(java.util.Set<TokenPackage> packagesIn)
set the Set of TokenPackage objects associated with this ActivationKey
|
void |
setServer(Server server) |
void |
setServerGroups(java.util.Set<ServerGroup> serverGroupsIn)
Set the Set of ServerGroup objects associated with this ActivationKey
|
protected void |
setToken(Token tokenIn) |
void |
setUniversalDefault(boolean def)
Sets the universal default.
|
void |
setUsageLimit(java.lang.Long limit) |
java.lang.String |
toString() |
getCreated, getModified, setCreated, setModified
public java.lang.String getKey()
public void setKey(java.lang.String keyIn)
keyIn
- The key to set.public KickstartSession getKickstartSession()
public void setKickstartSession(KickstartSession kickstartSessionIn)
kickstartSessionIn
- The kickstartSession to set.public Token getToken()
protected void setToken(Token tokenIn)
tokenIn
- The token to set.public java.lang.String toString()
toString
in class BaseDomainHelper
public void setId(java.lang.Long id)
id
- The id to setpublic java.lang.Long getId()
public void setCreator(User user)
user
- The user to setpublic User getCreator()
public void setOrg(Org org)
org
- The org to setpublic Org getOrg()
public void setServer(Server server)
server
- The server to setpublic Server getServer()
public void setNote(java.lang.String note)
note
- The note to setpublic java.lang.String getNote()
public void setDeployConfigs(boolean b)
b
- Deploy configspublic boolean getDeployConfigs()
public void setDisabled(java.lang.Boolean disabled)
disabled
- The disabled to setpublic boolean isDisabled()
public void setUsageLimit(java.lang.Long limit)
limit
- The usage limit to setpublic java.lang.Long getUsageLimit()
public void setEntitlements(java.util.Set entitlementsIn)
entitlementsIn
- The entitlements to setpublic java.util.Set<ServerGroupType> getEntitlements()
public void addEntitlement(ServerGroupType entitlementIn)
entitlementIn
- The entitlement to add to the tokens entitlements set.public void removeEntitlement(ServerGroupType entitlementIn)
entitlementIn
- The entitlement to remove from the tokens entitlements set.public void addChannel(Channel channelIn)
channelIn
- to addpublic void removeChannel(Channel channelIn)
channelIn
- to removepublic void clearChannels()
public java.util.Set<Channel> getChannels()
public void setChannels(java.util.Set channelsIn)
channelsIn
- Channel setpublic void addServerGroup(ManagedServerGroup serverGroupIn)
serverGroupIn
- to addpublic void removeServerGroup(ServerGroup serverGroupIn)
serverGroupIn
- to removepublic java.util.Set<ServerGroup> getServerGroups()
public void setServerGroups(java.util.Set<ServerGroup> serverGroupsIn)
serverGroupsIn
- Servers Groups setpublic void addPackage(PackageName packageNameIn, PackageArch packageArchIn)
packageNameIn
- PackageName of package to addpackageArchIn
- PackageArch of package to addpublic void removePackage(PackageName packageNameIn, PackageArch packageArchIn)
packageNameIn
- PackageName of package to removepackageArchIn
- PackageArch of package to removepublic java.util.Set<TokenPackage> getPackages()
public void setPackages(java.util.Set<TokenPackage> packagesIn)
packagesIn
- Set of TokenPackage objects.public void clearPackages()
public void clearConfigChannels()
public java.util.List<ConfigChannel> getConfigChannelsFor(User user)
user
- the user needed to ensure credentialspublic void setBaseChannel(Channel chan)
chan
- the base channel associated to this activation key.public Channel getBaseChannel()
public void setUniversalDefault(boolean def)
def
- the universal defaultpublic boolean isUniversalDefault()
public static java.lang.String makePrefix(Org org)
org
- the org of the activation keypublic static java.lang.String sanitize(Org org, java.lang.String key)
org
- the org information to make the prefixkey
- the activation key to be sanitized