|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.manager.BaseManager
com.redhat.rhn.manager.action.ActionManager
public class ActionManager
ActionManager - the singleton class used to provide Business Operations on Actions where those operations interact with other top tier Business Objects. Operations that require the Action make changes to
| Field Summary | |
|---|---|
static java.lang.String[] |
PACKAGES_NOT_REMOVABLE
|
| Method Summary | |
|---|---|
static void |
addServerToAction(java.lang.Long sid,
Action action)
Adds a server to an action |
static void |
archiveActions(User user,
java.lang.String label)
Archives the action set with the given label. |
static DataResult |
archivedActions(User user,
PageControl pc)
Retrieve the list of completed actions for a particular user |
static void |
cancelAction(User user,
Action action)
Cancels the server actions associated with a given action, and if required deals with assicuated pending kickstart actions. |
static void |
cancelActions(User user,
java.util.List actionsToCancel)
Cancels all actions in given list. |
static DataResult |
completedActions(User user,
PageControl pc)
Retrieve the list of completed actions for a particular user |
static DataResult |
completedSystems(User user,
Action action,
PageControl pc)
Retrieves the systems that have completed a given action |
static Action |
createBaseAction(User user,
Server server,
ActionType type)
|
static Action |
createConfigAction(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<java.lang.Long> serverIds,
ActionType type,
java.util.Date earliest)
Create a Config Action. |
static Action |
createConfigActionForServers(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<Server> servers,
ActionType type,
java.util.Date earliest)
Create a Config Action. |
static Action |
createConfigDiffAction(User user,
java.util.Set<java.lang.Long> revisions,
java.util.Set servers)
Create a Config File Diff action. |
static Action |
createConfigUploadAction(User user,
java.util.Set filenames,
Server server,
ConfigChannel channel,
java.util.Date earliest)
Create a Config Upload action. |
static ErrataAction |
createErrataAction(Org org,
Errata errata)
Creates an errata action with the specified Org |
static Action |
createErrataAction(User user,
Errata errata)
Creates an errata action |
static Action |
createPatchInstallAction(User user,
Server server,
RhnSet set)
|
static Action |
createPatchRemoveAction(User user,
Server server,
RhnSet set)
|
static Action |
createPatchSetInstallAction(User user,
Server server,
PatchSet patchSet)
|
static ScriptActionDetails |
createScript(java.lang.String username,
java.lang.String groupname,
java.lang.Long timeout,
java.lang.String script)
Creates a ScriptActionDetails which contains an arbitrary script to be run by a ScriptRunAction. |
static DataResult |
failedActions(User user,
PageControl pc)
Retrieve the list of failed actions for a particular user |
static DataResult |
failedSystems(User user,
Action action,
PageControl pc)
Retrieves the systems that failed completing a given action |
static DataResult |
getPackageList(java.lang.Long aid,
PageControl pc)
Returns the list of packages associated with a specific action. |
static DataResult |
inProgressSystems(User user,
Action action,
PageControl pc)
Retrieves the systems that are in the process of completing a given action |
static Action |
lookupAction(User user,
java.lang.Long aid)
Retreive the specified Action, assuming that the User making the request has the required permissions. |
static Action |
lookupLastCompletedAction(User user,
ActionType type,
Server server)
Lookup the last completed Action on a Server given the user, action type and server. |
static DataResult |
pendingActions(User user,
PageControl pc)
Retrieve the list of pending actions for a particular user |
static DataResult |
pendingActionsInSet(User user,
PageControl pc,
java.lang.String setLabel)
Retrieve the list of pending actions for a particular user within the given set. |
static DataResult |
recentlyScheduledActions(User user,
PageControl pc,
long age)
Retrieve the list of unarchived scheduled actions for the current user |
static int |
removeActions(java.util.List actionIds)
Removes a list of actions. |
static void |
removeSystemFromAction(Server serverIn,
Action actionIn)
Remove the system from the passed in Action. |
static void |
rescheduleAction(Action action)
Reschedule the action so it can be attempted again. |
static void |
rescheduleAction(Action action,
boolean onlyFailed)
Reschedule the action so it can be attempted again. |
static java.util.List |
scheduleAllErrataUpdate(User scheduler,
Server srvr,
java.util.Date earliest)
Schedules all Errata for the given system. |
static Action |
scheduleHardwareRefreshAction(User scheduler,
Server srvr,
java.util.Date earliestAction)
Schedule a KickstartAction against a system |
static KickstartAction |
scheduleKickstartAction(KickstartData ksdata,
User scheduler,
Server srvr,
java.util.Date earliestAction,
java.lang.String appendString)
Schedule a KickstartAction against a system |
static KickstartGuestAction |
scheduleKickstartGuestAction(ProvisionVirtualInstanceCommand pcmd,
java.lang.Long ksSessionId)
Schedule a KickstartGuestAction against a system |
static Action |
schedulePackageAction(User scheduler,
Server srvr,
java.util.List pkgs,
ActionType type,
java.util.Date earliestAction)
Schedules a package action of the given type for the given server with the packages given as a list. |
static PackageAction |
schedulePackageInstall(User scheduler,
Server srvr,
java.util.List pkgs,
java.util.Date earliestAction)
Schedules one or more package installation actions for the given server. |
static Action |
schedulePackageInstall(User scheduler,
Server srvr,
java.lang.Long nameId,
java.lang.Long evrId)
Schedules a package action of the given type for the given server with the packages given as a list. |
static PackageAction |
schedulePackageInstall(User scheduler,
Server srvr,
RhnSet pkgs)
Schedules one or more package installation actions for the given server. |
static PackageAction |
schedulePackageRefresh(User scheduler,
Server server)
Schedules a package list refresh action for the given server. |
static PackageAction |
schedulePackageRemoval(User scheduler,
Server srvr,
RhnSet pkgs)
Schedules one or more package removal actions for the given server. |
static PackageAction |
schedulePackageRunTransaction(User scheduler,
Server server,
java.util.List pkgs,
java.util.Date earliest)
Schedules a package runtransaction action. |
static PackageAction |
schedulePackageUpgrade(User scheduler,
Server srvr,
RhnSet pkgs)
Schedules one or more package upgrade actions for the given server. |
static PackageAction |
schedulePackageVerify(User scheduler,
Server srvr,
RhnSet pkgs)
Schedules one or more package verification actions for the given server. |
static Action |
scheduleRebootAction(User scheduler,
Server srvr,
java.util.Date earliestAction)
Schedule a KickstartAction against a system |
static ScriptRunAction |
scheduleScriptRun(User scheduler,
Server srvr,
java.lang.String name,
ScriptActionDetails script)
Schedules one or more package installation actions for the given server. |
static ScriptRunAction |
scheduleScriptRun(User scheduler,
Server srvr,
java.lang.String name,
ScriptActionDetails script,
java.util.Date earliest)
Schedules one or more package installation actions for the given server. |
static void |
storeAction(Action actionIn)
Stores the action in the database through hibernate |
| Methods inherited from class com.redhat.rhn.manager.BaseManager |
|---|
makeDataResult, makeDataResult, makeDataResultNoPagination, processListControl, processPageControl |
| 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[] PACKAGES_NOT_REMOVABLE
| Method Detail |
|---|
public static int removeActions(java.util.List actionIds)
actionIds - actions to remove
public static Action lookupAction(User user,
java.lang.Long aid)
user - The user making the lookup request.aid - The id of the Action to lookup.
LookupException - if the Action
can't be looked up.
public static Action lookupLastCompletedAction(User user,
ActionType type,
Server server)
user - the user doing the search (needed for permssion checking)type - the action type of the action to be queried.server - the server who's latest completed action is desired.
public static void archiveActions(User user,
java.lang.String label)
user - User associated with the set of actions.label - Action label to be updated.
public static void cancelActions(User user,
java.util.List actionsToCancel)
user - User associated with the set of actions.actionsToCancel - List of actions to be cancelled.
public static void cancelAction(User user,
Action action)
user - User requesting the action be cancelled.action - Action to be cancelled.
public static void addServerToAction(java.lang.Long sid,
Action action)
sid - The server idaction - The parent action
public static ErrataAction createErrataAction(Org org,
Errata errata)
org - The org that needs the errata.errata - The errata pertaining to this action
public static Action createErrataAction(User user,
Errata errata)
user - The user scheduling errataerrata - The errata pertaining to this action
public static Action createConfigUploadAction(User user,
java.util.Set filenames,
Server server,
ConfigChannel channel,
java.util.Date earliest)
user - The scheduler for this config action.filenames - A set of config file name ids as Longsserver - The server for which to schedule this action.channel - The config channel to which files will be uploaded.earliest - The soonest time that this action could be executed.
public static Action createConfigDiffAction(User user,
java.util.Set<java.lang.Long> revisions,
java.util.Set servers)
user - The user scheduling a diff action.revisions - A set of revision ids as Longsservers - A set of server ids as Longs
public static Action createConfigActionForServers(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<Server> servers,
ActionType type,
java.util.Date earliest)
user - The user scheduling the action.revisions - A set of revision ids as Longsservers - A set of server objectstype - The type of config actionearliest - The earliest time this action could execute.
public static Action createConfigAction(User user,
java.util.Collection<java.lang.Long> revisions,
java.util.Collection<java.lang.Long> serverIds,
ActionType type,
java.util.Date earliest)
user - The user scheduling the action.revisions - A set of revision ids as LongsserverIds - A set of server ids as Longstype - The type of config actionearliest - The earliest time this action could execute.
public static Action createPatchRemoveAction(User user,
Server server,
RhnSet set)
user - The user scheduling the patch removalserver - The server patch removal applies toset - The set of patches to remove
public static Action createPatchInstallAction(User user,
Server server,
RhnSet set)
user - The user scheduling the patch removalserver - The server patch removal applies toset - The set of patches to remove
public static Action createPatchSetInstallAction(User user,
Server server,
PatchSet patchSet)
user - The user scheduling the patch cluster installserver - The server patch cluster install applies topatchSet - The patch cluster to install
public static Action createBaseAction(User user,
Server server,
ActionType type)
user - The user scheduling the actionserver - The server the action is being scheduled fortype - The type of the action
public static void storeAction(Action actionIn)
actionIn - The action to be storedpublic static void rescheduleAction(Action action)
action - Action to reschedule
public static void rescheduleAction(Action action,
boolean onlyFailed)
action - Action to rescheduleonlyFailed - reschedule only the ServerActions w/failed status
public static DataResult recentlyScheduledActions(User user,
PageControl pc,
long age)
user - The user in questionpc - The details of which results to returnage - how many days old a system can be in order to count as a "recently"
scheduled action
public static DataResult pendingActions(User user,
PageControl pc)
user - The user in questionpc - The details of which results to return
public static DataResult pendingActionsInSet(User user,
PageControl pc,
java.lang.String setLabel)
user - The user in questionpc - The details of which results to returnsetLabel - Label of an RhnSet of actions IDs to limit the results to.
public static DataResult failedActions(User user,
PageControl pc)
user - The user in questionpc - The details of which results to return
public static DataResult completedActions(User user,
PageControl pc)
user - The user in questionpc - The details of which results to return
public static DataResult archivedActions(User user,
PageControl pc)
user - The user in questionpc - The details of which results to return
public static DataResult getPackageList(java.lang.Long aid,
PageControl pc)
aid - The action id for the action in questionpc - The details of which results to return
public static DataResult completedSystems(User user,
Action action,
PageControl pc)
user - The user in question.action - The Action.pc - The PageControl.
public static DataResult inProgressSystems(User user,
Action action,
PageControl pc)
user - The user in question.action - The Action.pc - The PageControl.
public static DataResult failedSystems(User user,
Action action,
PageControl pc)
user - The user in question.action - The Action.pc - The PageControl.
public static PackageAction schedulePackageRefresh(User scheduler,
Server server)
scheduler - User scheduling the action.server - Server for which the action affects.
public static PackageAction schedulePackageRunTransaction(User scheduler,
Server server,
java.util.List pkgs,
java.util.Date earliest)
scheduler - User scheduling the action.server - Server for which the action affects.pkgs - List of PackageMetadata's to be run.earliest - The earliest time this action should be run.
public static PackageAction schedulePackageRemoval(User scheduler,
Server srvr,
RhnSet pkgs)
scheduler - User scheduling the action.srvr - Server for which the action affects.pkgs - The set of packages to be removed.
public static PackageAction schedulePackageUpgrade(User scheduler,
Server srvr,
RhnSet pkgs)
scheduler - User scheduling the action.srvr - Server for which the action affects.pkgs - The set of packages to be removed.
public static PackageAction schedulePackageInstall(User scheduler,
Server srvr,
java.util.List pkgs,
java.util.Date earliestAction)
scheduler - User scheduling the action.srvr - Server for which the action affects.pkgs - The set of packages to be removed.earliestAction - Date of earliest action to be executed
public static PackageAction schedulePackageInstall(User scheduler,
Server srvr,
RhnSet pkgs)
scheduler - User scheduling the action.srvr - Server for which the action affects.pkgs - The set of packages to be removed.
public static PackageAction schedulePackageVerify(User scheduler,
Server srvr,
RhnSet pkgs)
scheduler - User scheduling the action.srvr - Server for which the action affects.pkgs - The set of packages to be removed.
public static ScriptRunAction scheduleScriptRun(User scheduler,
Server srvr,
java.lang.String name,
ScriptActionDetails script)
scheduler - User scheduling the action.srvr - Server for which the action affects.script - The set of packages to be removed.name - Name of Script action.
public static ScriptRunAction scheduleScriptRun(User scheduler,
Server srvr,
java.lang.String name,
ScriptActionDetails script,
java.util.Date earliest)
scheduler - User scheduling the action.srvr - Server for which the action affects.script - The set of packages to be removed.name - Name of Script action.earliest - Earliest occurrence of the script.
public static ScriptActionDetails createScript(java.lang.String username,
java.lang.String groupname,
java.lang.Long timeout,
java.lang.String script)
username - Username of scriptgroupname - Group script runs asscript - Script contentstimeout - script timeout
public static KickstartAction scheduleKickstartAction(KickstartData ksdata,
User scheduler,
Server srvr,
java.util.Date earliestAction,
java.lang.String appendString)
ksdata - KickstartData to associate with this Actionscheduler - User scheduling the action.srvr - Server for which the action affects.earliestAction - Date run the ActionappendString - extra options to add to the action.
public static KickstartGuestAction scheduleKickstartGuestAction(ProvisionVirtualInstanceCommand pcmd,
java.lang.Long ksSessionId)
pcmd - most information needed to create this actionksSessionId - Kickstart Session ID to associate with this action
public static Action scheduleRebootAction(User scheduler,
Server srvr,
java.util.Date earliestAction)
scheduler - User scheduling the action.srvr - Server for which the action affects.earliestAction - Date run the Action
public static Action scheduleHardwareRefreshAction(User scheduler,
Server srvr,
java.util.Date earliestAction)
scheduler - User scheduling the action.srvr - Server for which the action affects.earliestAction - Date run the Action
public static java.util.List scheduleAllErrataUpdate(User scheduler,
Server srvr,
java.util.Date earliest)
scheduler - Person scheduling the action.srvr - Server whose errata is going to be scheduled.earliest - Earliest possible time action will occur.
public static void removeSystemFromAction(Server serverIn,
Action actionIn)
serverIn - to remove from ActionactionIn - to process
public static Action schedulePackageInstall(User scheduler,
Server srvr,
java.lang.Long nameId,
java.lang.Long evrId)
scheduler - The user scheduling the action.srvr - The server that this action is for.nameId - nameId rhnPackage.name_idevrId - evrId of action
public static Action schedulePackageAction(User scheduler,
Server srvr,
java.util.List pkgs,
ActionType type,
java.util.Date earliestAction)
scheduler - The user scheduling the action.srvr - The server that this action is for.pkgs - A list of maps containing keys 'name_id' and 'evr_id'
with Long values.type - The type of the package action. One of the static types found in
ActionFactoryearliestAction - The earliest time that this action could happen.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||