|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.common.hibernate.HibernateFactory
com.redhat.rhn.domain.token.ActivationKeyFactory
public class ActivationKeyFactory
ActivationKeyFactory
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_DESCRIPTION
|
| Constructor Summary | |
|---|---|
ActivationKeyFactory()
|
|
| Method Summary | |
|---|---|
static void |
assertKeyAbsence(java.lang.String key)
Basically asserts that the key passed in has not been previously accounted for. |
static ActivationKey |
createNewKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
Creates and fills out a new Activation Key (Including generating a key/token). |
static ActivationKey |
createNewKey(User user,
java.lang.String note)
Creates and fills out a new Activation Key (Including generating a key/token). |
static java.lang.String |
generateKey()
Generate a random activation key string. |
protected Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the correct class |
static ActivationKey |
lookupByKey(java.lang.String key)
Lookup an ActivationKey by it's key string. |
static ActivationKey |
lookupByKickstartSession(KickstartSession sess)
Lookup an ActivationKey by its associated KickstartSession. |
static ActivationKey |
lookupByServer(Server server)
Lookup an ActivationKey by its associated Server. |
static ActivationKey |
lookupByToken(Token tokenIn)
Lookup the root ActivationKey based on the token. |
static void |
removeKey(ActivationKey key)
Remove an ActivationKey |
static void |
save(ActivationKey keyIn)
Saves an ActivationKey to the database |
| Methods inherited from class com.redhat.rhn.common.hibernate.HibernateFactory |
|---|
addConfigurator, blobToByteArray, blobToString, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, executeSelectMode, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToBlob |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_DESCRIPTION
| Constructor Detail |
|---|
public ActivationKeyFactory()
| Method Detail |
|---|
public static ActivationKey lookupByKey(java.lang.String key)
key - The key for the ActivationKey
public static ActivationKey lookupByToken(Token tokenIn)
tokenIn - token coming in
public static ActivationKey createNewKey(User user,
java.lang.String note)
user - The user for the keynote - The note to attach to the key
public static ActivationKey createNewKey(User user,
Server server,
java.lang.String key,
java.lang.String note,
java.lang.Long usageLimit,
Channel baseChannel,
boolean universalDefault)
user - The user for the keyserver - The server for the keykey - Key to use, blank to have one auto-generatednote - The note to attach to the 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 static void assertKeyAbsence(java.lang.String key)
key - the name of the key.public static java.lang.String generateKey()
public static void save(ActivationKey keyIn)
keyIn - The ActivationKey to save.protected Logger getLogger()
getLogger in class HibernateFactorypublic static ActivationKey lookupByKickstartSession(KickstartSession sess)
sess - that is associated with ActivationKey
public static ActivationKey lookupByServer(Server server)
server - that is associated with ActivationKey
public static void removeKey(ActivationKey key)
key - to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||