|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.manager.token.ActivationKeyManager
public class ActivationKeyManager
ActivationKeyManager
| Method Summary | |
|---|---|
void |
addChannel(ActivationKey key,
Channel channel)
Add a channel to an activation key. |
void |
addEntitlements(ActivationKey key,
java.util.List<java.lang.String> entitlementLabels)
Add entitlements to an activation key. |
void |
addPackageName(ActivationKey key,
PackageName packageName)
Add a PackageName to an activation key. |
void |
addServerGroup(ActivationKey key,
ManagedServerGroup group)
Add a ServerGroup to an activation key. |
void |
changeKey(java.lang.String newKey,
ActivationKey key)
Renames a given key to new key. |
ActivationKey |
createNewActivationKey(User user,
java.lang.String note)
Create a new ActivationKey object for a given user, and note. |
ActivationKey |
createNewActivationKey(User user,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
Create a new ActivationKey object for a given user, and note. |
ActivationKey |
createNewReActivationKey(User user,
Server server,
java.lang.String note)
Create a new Re-ActivationKey object for a given user, server, and note |
ActivationKey |
createNewReActivationKey(User user,
Server server,
java.lang.String note,
KickstartSession session)
Create a new Re-ActivationKey object for a given user, server, and note |
ActivationKey |
createNewReActivationKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
Create a new Re-ActivationKey object for a given user, server, and note. |
ActivationKey |
createNewReActivationKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault,
KickstartSession session)
Create a new Re-ActivationKey object for a given user, server, and note. |
java.util.List<ActivationKey> |
findAll(User requester)
Finds all activation keys visible to user. |
ActivationKey |
findByServer(Server server,
User user)
Look up an ActivationKey object by server |
static ActivationKeyManager |
getInstance()
|
ActivationKey |
lookupByKey(java.lang.String key,
User user)
Look up an ActivationKey object by it's key. |
void |
remove(ActivationKey key)
Removes an activation key. |
void |
removeChannel(ActivationKey key,
Channel channel)
Remove a channel from an activation key. |
void |
removeEntitlements(ActivationKey key,
java.util.List<java.lang.String> entitlementLabels)
Remove entitlements from an activation key. |
void |
removePackageName(ActivationKey key,
PackageName packageName)
Remove a PackageName from an activation key. |
void |
removeServerGroup(ActivationKey key,
ServerGroup group)
Remove a ServerGroup from an activation key. |
void |
update(ActivationKey target,
java.lang.String description,
Channel baseChannel)
Update the given ActivationKey details. |
void |
validateAddOnEntitlements(java.util.List<java.lang.String> entitlements,
boolean adding)
Validate the requested entitlements. |
void |
validateCredentials(User user,
java.lang.String keyStr,
ActivationKey key)
validates that the given user can administer the given activation key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ActivationKeyManager getInstance()
public ActivationKey findByServer(Server server,
User user)
server - The server in questionuser - needed for authentication
public ActivationKey lookupByKey(java.lang.String key,
User user)
key - The activation key we're searching for.user - needed for authentication..
public ActivationKey createNewReActivationKey(User user,
Server server,
java.lang.String note,
KickstartSession session)
user - The user creating the activation keyserver - The server for the activation keynote - A note about the activation keysession - the kickstart session associated with the key
public ActivationKey createNewReActivationKey(User user,
Server server,
java.lang.String note)
user - The user creating the activation keyserver - The server for the activation keynote - A note about the activation key
public ActivationKey createNewReActivationKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
user - The user creating the activation keyserver - the server to create the key forkey - Key to use, empty string to have one auto-generatednote - A note about the activation keyusageLimit - Usage limit for the activation keybaseChannel - Base channel for the activation keyuniversalDefault - Whether or not this key should be set as the universal
default.
public ActivationKey createNewReActivationKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault,
KickstartSession session)
user - The user creating the activation keyserver - the server to create the key forkey - Key to use, empty string to have one auto-generatednote - A note about the activation keyusageLimit - Usage limit for the activation keybaseChannel - Base channel for the activation keyuniversalDefault - Whether or not this key should be set as the universal
default.session - the kickstart session to associate
public ActivationKey createNewActivationKey(User user,
java.lang.String note)
user - The user creating the activation keynote - A note about the activation key
public ActivationKey createNewActivationKey(User user,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
user - The user creating the activation keykey - Key to use, empty string to have one auto-generatednote - A note about the activation keyusageLimit - Usage limit for the activation keybaseChannel - Base channel for the activation keyuniversalDefault - Whether or not this key should be set as the universal
default.
public void update(ActivationKey target,
java.lang.String description,
Channel baseChannel)
target - Key to update.description - New key description, null to leave unchanged.baseChannel - New base channel
public void addEntitlements(ActivationKey key,
java.util.List<java.lang.String> entitlementLabels)
key - Activation key to be acted uponentitlementLabels - List of string entitlement labels for the activation key
public void removeEntitlements(ActivationKey key,
java.util.List<java.lang.String> entitlementLabels)
key - Activation key to be acted uponentitlementLabels - List of string entitlement labels for the activation key
public void addChannel(ActivationKey key,
Channel channel)
key - Activation key to be acted uponchannel - Channel to add
public void removeChannel(ActivationKey key,
Channel channel)
key - Activation key to be acted uponchannel - Channel to remove
public void addServerGroup(ActivationKey key,
ManagedServerGroup group)
key - Activation key to be acted upongroup - ServerGroup to add
public void removeServerGroup(ActivationKey key,
ServerGroup group)
key - Activation key to be acted upongroup - ServerGroup to remove
public void addPackageName(ActivationKey key,
PackageName packageName)
key - Activation key to be acted uponpackageName - PackageName to add
public void removePackageName(ActivationKey key,
PackageName packageName)
key - Activation key to be acted uponpackageName - PackageName to removepublic java.util.List<ActivationKey> findAll(User requester)
requester - User requesting the list.
public void validateCredentials(User user,
java.lang.String keyStr,
ActivationKey key)
user - the user to authenticatekeyStr - Key string used for lookup. Null if none was used. (i.e. lookup
by server)key - the key to authenticatepublic void remove(ActivationKey key)
key - the key to remove
public void validateAddOnEntitlements(java.util.List<java.lang.String> entitlements,
boolean adding)
entitlements - List of string entitlement labels to be validated.adding - True if adding entitlements, false if removing.
public void changeKey(java.lang.String newKey,
ActivationKey key)
newKey - the key to rename tokey - the key object to be renamed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||