public class ConfigurationManager extends BaseManager
Modifier and Type | Field and Description |
---|---|
static int |
ENABLE_ERROR_APPSTREAM |
static int |
ENABLE_ERROR_PACKAGES |
static int |
ENABLE_ERROR_RHNTOOLS |
static int |
ENABLE_SUCCESS |
static java.lang.String |
FEATURE_CONFIG |
Modifier and Type | Method and Description |
---|---|
boolean |
accessToChannel(java.lang.Long uid,
java.lang.Long ccid) |
void |
copyConfigFile(ConfigRevision revision,
ConfigChannel channel,
User user)
Copies a config file.
|
ConfigFileCount |
countAllActionPaths(Server server,
Action action)
Returns the number of files, and directories
that were on a applied to server by a given config action
This is method is mainly used to show the number
of files and directories that were deployed/diff'd
Note this method doesnot check whether the Action is
visible to the user.
|
ConfigFileCount |
countCentrallyDeployablePaths(Server server,
User user)
Returns the sum of all the 'Deployable' files, and directories
that are present in the all the centrally managed channels
in a given server.
|
ConfigFileCount |
countCentrallyManagedPaths(Server server,
User user)
Returns the sum of files, and directories
that are present in the all the centrally managed channels
in a given server.
|
ConfigFileCount |
countDifferingPaths(Server server,
Action action)
Returns the number of files on the server that differed
in content from the files in RHN - Managed
Note this method doesnot check whether the Action is
visible to the user.
|
ConfigFileCount |
countLocallyManagedPaths(Server server,
User user,
ConfigChannelType cct)
Returns the number of files, and directories
that are managed in the local override channel or Sandbox channel
of a given server..
|
ConfigFileCount |
countSuccessfulCompares(Server server,
Action action)
Returns the number of files, and directories
that were SUCCESSFULLY applied to server by a given config action
This is method is mainly used to show the number
of files and directories that were scheduled for comparison
Returns the number of files
that were selected successfully for comparison
in a config DIFF action.
|
ConfigRevision |
createNewRevision(User user,
java.io.InputStream input,
ConfigFile file,
java.lang.Long size)
Creates a new config revision object.
|
ConfigRevision |
createNewRevision(User user,
java.io.InputStream input,
java.lang.Long cfid,
java.lang.Long size)
Creates a new config revision object.
|
void |
deleteConfigChannel(User user,
ConfigChannel channel)
Deletes a config channel.
|
void |
deleteConfigFile(User user,
ConfigFile file)
Deletes a config file.
|
boolean |
deleteConfigRevision(User user,
ConfigRevision revision)
Deletes a config revision.
|
void |
deployConfiguration(User user,
java.util.Collection<Server> servers,
ConfigChannel channel,
java.util.Date datePicked)
Schedules deploys of all the configuration files or dirs
associated to a list of servers
|
void |
deployConfiguration(User user,
java.util.Collection<Server> servers,
java.util.Date datePicked)
Schedules deploys of all the configuration files or dirs
associated to a list of servers
|
java.util.Map |
deployFiles(User usr,
java.util.Set fileIds,
java.util.Set systemIds,
java.util.Date datePicked)
Deploy revisions to systems.
|
java.util.Map |
deployFiles(User usr,
java.util.Set fileIds,
java.util.Set systemIds,
java.util.Date datePicked,
ActionChain actionChain)
Deploy revisions to systems, optionally in an Action Chain.
|
void |
enableSystems(RhnSetDecl set,
User user,
java.util.Date earliest)
Enable the set of systems given for configuration management.
|
void |
ensureConfigManageable(Server server)
Method to ensure config management features are available for a given system
are available..
|
ChannelSummary |
getChannelSummary(User user,
ConfigChannel channel)
Return ChannelSummary info - see ChannelOverview
|
java.lang.Long |
getDeployableRevisionForFileName(java.lang.Long cfnid,
java.lang.Long sid)
Returns the config revision id for a config file with the given config
file name id.
|
int |
getDirCount(User user,
ConfigChannel channel)
Return the number of Directories in this config-channel
|
DataResult |
getEnableSummary(User user,
PageControl pc,
java.lang.String set)
Get a summary of configuration enablement.
|
int |
getFileCount(User user,
ConfigChannel channel)
Return the number of Files in this config-channel
|
DataResult |
getFileInfo(User user,
ConfigChannel channel)
List files controlled by this channel, sorted by date-modified (descending)
|
int |
getFileStorage(User user,
ConfigFile file)
Return the number of bytes used for all revisions of the specified ConfigFile
|
static ConfigurationManager |
getInstance() |
java.util.Map |
getOverviewSummary(User user)
Returns a map of summary information.
|
DataResult |
getRecentConfigDeployActions(User user,
java.lang.Integer results)
Lists the last n most recent config deploy actions visible
by a user where n is the results param and user is the user param.
|
DataResult |
getRecentlyModifiedConfigFiles(User user,
java.lang.Integer results)
Lists the last n most recently modified configuration files visible
by a user where n is the results param and user is the user param.
|
java.lang.Long |
getServerIdFor(ConfigChannel cc,
User user)
Returns the server id associated to a local/sandbox channel
|
DataResult |
getSuccesfulDeploysTo(User usr,
ConfigFileName cfn,
Server srv)
For a given filename and server, find all the successful deploys of a file with that
name
|
int |
getSymlinkCount(User user,
ConfigChannel channel)
Return the number of Symlinks in this config-channel
|
int |
getSystemCount(User user,
ConfigChannel channel)
Return the number of systems subscribed to the specified channel.
|
DataResult |
getSystemInfo(User user,
ConfigChannel channel)
List systems subscribed to this channel, sorted by date-modified (descending)
|
boolean |
isConfigEnabled(Server server,
User user)
Returns the given system is config enabled.
|
boolean |
isDuplicated(java.lang.String label,
ConfigChannelType cct,
Org org)
Returns true if there already exists
a config channel with the same label, cc type and org.
|
DataResult<ConfigFileNameDto> |
listAllFileNamesForSystem(Server server)
Lists the file names to which the given server is subscribed
Finds the deployable revisions for each file name.
|
DataResult |
listAlternateFilesForCompare(User user,
ConfigFile current,
PageControl pc)
Lists all the alternatives for a given file in other config channels.
|
java.util.List |
listChannelsForCopy(User user,
ConfigChannel cc,
java.lang.String ccType)
List cfg-channels OTHER THAN the specified one, that are of the specified type,
and are accessible to the specified user
|
DataResult |
listChannelsForFileCompare(User user,
PageControl pc)
Lists all the other channels in this org.
|
DataResult |
listChannelsForFileCopy(User user,
ConfigFile current,
java.lang.String type,
PageControl pc)
Lists all global config channels in this user's org except the one that
contains the given config file.
|
DataResult |
listChannelsForSystem(User user,
Server server,
PageControl pc)
List global config channels for a system.
|
DataResult |
listChannelSystems(User user,
ConfigChannel channel,
PageControl pc)
List systems subscribed to this channel, sorted by date added (descending)
|
DataResult |
listConfigChannelsForSystem(User user,
Server server,
PageControl pc)
Lists the config channels in the user's config channel set to which the
given server is subscribed.
|
DataResult<ConfigFileDto> |
listCurrentFiles(User user,
ConfigChannel channel,
PageControl pc)
List current files for channel withOUT using a set
|
DataResult |
listCurrentFiles(User user,
ConfigChannel channel,
PageControl pc,
java.lang.String setLabel)
List latest revisions controlled by this channel, sorted by date-modified
(descending), optionally constrained by the specified set
|
DataResult |
listFileNamesForSsm(User user,
PageControl pc)
Lists the file names of all files subscribed to by systems in the
given user's system_list set.
|
DataResult<ConfigFileNameDto> |
listFileNamesForSystem(User user,
Server server,
PageControl pc)
Lists the file names to which the given server is subscribed
Finds the deployable revisions for each file name.
|
DataResult<ConfigFileNameDto> |
listFileNamesForSystemChannel(User user,
Server server,
ConfigChannel channel,
PageControl pc)
Lists the file names to which the given server is subscribed by channel
Finds the deployable revisions for each file name.
|
DataResult<ConfigFileNameDto> |
listFileNamesForSystemQuick(User user,
Server server,
PageControl pc)
Lists the file names to which the given server is subscribed
Finds the deployable revisions for each file name.
|
DataResult |
listFileNamesInSet(User user,
Server server,
java.lang.String setLabel,
PageControl pc)
Lists the file names in the user's config file name set whether or not they
are relevant to the given server.
|
DataResult |
listFileNamesInSetForSystem(User user,
Server server,
PageControl pc)
Lists the file names in the user's config file name set relevant to the
given server.
|
DataResult |
listFilesInChannel(User user,
ConfigChannel channel,
PageControl pc)
Gets a list of files (not directories) in the given config channel.
|
DataResult |
listFilesNotInChannel(User usr,
ConfigChannel cc,
PageControl pc)
For a specified channel, return info about all config-files that the
user has access to that are NOT already in that channel
|
DataResult<ConfigChannelDto> |
listGlobalChannels(User user,
PageControl pc)
List all of the global channels a given user can see.
|
DataResult<ConfigChannelDto> |
listGlobalChannelsForActivationKey(ActivationKey key,
User user)
List the global channels in a activation key.
|
DataResult<ConfigChannelDto> |
listGlobalChannelsForActivationKeySubscriptions(ActivationKey key,
User user)
List all of the global channels a given user can see
in the activaiton keys page.
|
DataResult<ConfigChannelDto> |
listGlobalChannelsForSystemSubscriptions(Server server,
User user,
PageControl pc)
This query basically lists all the global channels
a user can see along with info on whether the
channels are subscribed to a given server
Basically used in SDC Subscribe Channels page
|
DataResult |
listGlobalConfigFiles(User user,
PageControl pc)
Lists all global config files in this user's org that this user can view
along with system count and overridden count.
|
DataResult<ConfigGlobalDeployDto> |
listGlobalFileDeployInfo(User usr,
ConfigChannel cc,
ConfigFile cf,
PageControl pc)
List the info for the systems subscribed to the specified channel,
for which we might want to schedule a deploy of the specified file,
without being constrained by a selected set of systems
|
DataResult<ConfigGlobalDeployDto> |
listGlobalFileDeployInfo(User usr,
ConfigChannel cc,
ConfigFile cf,
PageControl pc,
java.lang.String setLabel)
List the info for the systems subscribed to the specified channel,
for which we might want to schedule a deploy of the specified file,
optionally constrained by a selected set of systems
|
DataResult |
listLocalConfigFiles(User user,
PageControl pc)
Lists all local config files in this user's org that this user can view.
|
java.util.List<? extends ConfigFileNameDto> |
listManagedPathsFor(Server server,
User user,
ConfigChannelType type)
Provides a list of 'Unique' paths (ConfigFileNameDto's)
for a given server and channel type.
|
DataResult |
listManagedSystemsAndFiles(User user,
PageControl pc)
Lists all configuration managed systems along with counts for how many
files and channels they are managed by.
|
DataResult |
listNonManagedSystems(User user,
PageControl pc)
Lists all systems visible to a user that are not configuration managed.
|
DataResult |
listNonManagedSystemsInSet(User user,
PageControl pc,
java.lang.String set)
Lists all systems visible to a user that are not configuration managed that are in
the given set.
|
DataResult |
listNonManagedSystemsInSetElaborate(User user,
java.lang.String set)
Lists all systems visible to a user that are not configuration managed that are in
the given set.
|
DataResult |
listRevisionsForCompare(User user,
ConfigFile file,
ConfigRevision current,
PageControl pc)
Lists all the revisions of the given file other than the given revision.
|
DataResult<ConfigRevisionDto> |
listRevisionsForFile(User user,
ConfigFile file,
PageControl pc)
List revisions for the given file
|
DataResult |
listSystemInfoForChannel(User usr,
ConfigChannel cc,
PageControl pc)
For a specified ConfigChannel, return overview info for the systems that are
subscribed to that channel.
|
DataResult |
listSystemInfoForChannel(User usr,
ConfigChannel cc,
PageControl pc,
boolean useSet)
For a specified ConfigChannel, return overview info for the systems that are
subscribed to that channel.
|
DataResult<ConfigSystemDto> |
listSystemsForConfigAction(User user,
PageControl pc,
java.lang.String feature)
Lists the systems in the user's system_list set that are subscribed to
files whose names are in the user's config file name set.
|
DataResult |
listSystemsForConfigChannel(User user,
java.lang.Long ccid,
PageControl pc)
Lists the systems in the given user's system_list set that are subscribed to a
config channel with the given config channel id.
|
DataResult |
listSystemsForCopy(User user,
PageControl pc)
List systems accessible to the specified user
|
DataResult |
listSystemsForFileCompare(User user,
java.lang.Long cfnid,
PageControl pc)
Get a list of systems for a config file diff action.
|
DataResult |
listSystemsForFileCopy(User user,
java.lang.Long cfnid,
ConfigChannelType chnlType,
PageControl pc)
Get a list of systems to whose local or sandbox channel one could copy a cfg-file
|
DataResult |
listSystemsForFileName(User user,
java.lang.Long cfnid,
PageControl pc)
Lists the systems in the given user's system_list set that are subscribed to a
config channel that contains a config file with the given config file name id.
|
DataResult |
listSystemsNotInChannel(User user,
ConfigChannel channel,
PageControl pc)
List systems NOT subscribed to this channel, sorted by name
|
ConfigChannel |
lookupConfigChannel(User user,
java.lang.Long id)
Looks up a config channel, if the given user has access to it.
|
ConfigChannel |
lookupConfigChannel(User user,
java.lang.String label,
ConfigChannelType cct)
Looks up a config channel, if the given user has access to it.
|
ConfigFile |
lookupConfigFile(User user,
java.lang.Long id)
Looks up a config file, if the given user has access to it.
|
ConfigFile |
lookupConfigFile(User user,
java.lang.Long ccid,
java.lang.String path)
Look up a config-file with a specified name in a specified cfg-channel.
|
ConfigRevision |
lookupConfigRevision(User user,
java.lang.Long id)
Looks up a config revision, if the given user has access to it.
|
ConfigRevision |
lookupConfigRevisionByRevId(User user,
ConfigFile cf,
java.lang.Long revId)
For a given configuration file, looks up a config revision id
|
java.util.List |
lookupConfigRevisions(ConfigFile cf)
For a given configuration file, return list of config revisions
|
DataResult |
ssmChannelList(User user,
PageControl pc)
List all of the global channels to which systems in the current user's
system_list are subscribed.
|
DataResult |
ssmChannelListForSubscribe(User user,
PageControl pc)
Lists all the global configuration channels to which the given user can subscribe
systems.
|
DataResult |
ssmChannelListForSubscribeAlreadySubbed(User user)
Returns configuration channels that every system in the SSM is subscribed
to.
|
java.util.List |
ssmChannelsInSetForSubscribe(User user)
List all the global channels to which the given user can subscribe
systems.
|
DataResult |
ssmSystemListForChannels(User user,
PageControl pc)
List all systems in the given user's system_list subscribed to at
least one channel in the user's config channel set
|
java.util.List |
ssmSystemsForSubscribe(User user)
List the systems in your system set along with the number
of channels selected to which they are already subscribed.
|
static DataResult |
systemSnapshotConfigChannels(java.lang.Long sid,
java.lang.Long ssid,
PageControl pc) |
static DataResult |
systemSnapshotConfigFiles(java.lang.Long ssid,
PageControl pc) |
makeDataResult, makeDataResult, makeDataResult, makeDataResult, makeDataResultNoPagination, makeDataResultNoPagination, processListControl, processPageControl
public static final int ENABLE_SUCCESS
public static final int ENABLE_ERROR_RHNTOOLS
public static final int ENABLE_ERROR_PACKAGES
public static final int ENABLE_ERROR_APPSTREAM
public static final java.lang.String FEATURE_CONFIG
public static ConfigurationManager getInstance()
public DataResult<ConfigChannelDto> listGlobalChannels(User user, PageControl pc)
user
- The user looking at channels.pc
- A page control for this user.public DataResult<ConfigChannelDto> listGlobalChannelsForActivationKeySubscriptions(ActivationKey key, User user)
key
- Activation Key whose channesl are to be ignoreduser
- The user looking at channels.public DataResult<ConfigChannelDto> listGlobalChannelsForActivationKey(ActivationKey key, User user)
key
- Activation Key to look up on.user
- The user looking at channels.public DataResult<ConfigChannelDto> listGlobalChannelsForSystemSubscriptions(Server server, User user, PageControl pc)
server
- the server to check the channels
subscriptions onuser
- The user looking at channels.pc
- A page control for this user.public DataResult listManagedSystemsAndFiles(User user, PageControl pc)
user
- The user requesting to view managed systemspc
- A page control for this user.public boolean isConfigEnabled(Server server, User user)
server
- The system we care abt finding config capability info onuser
- The user requesting to view target systemspublic DataResult listNonManagedSystems(User user, PageControl pc)
user
- The user requesting to view target systemspc
- A page control for this user.public DataResult listNonManagedSystemsInSet(User user, PageControl pc, java.lang.String set)
user
- The user requesting to view target systemspc
- A page control for this user.set
- The label for the desired RhnSetpublic DataResult listNonManagedSystemsInSetElaborate(User user, java.lang.String set)
user
- The user about to enable thingsset
- The name of the set.public DataResult listRevisionsForCompare(User user, ConfigFile file, ConfigRevision current, PageControl pc)
user
- The user requesting a list of revisions.file
- The file that the revisions should be for.current
- The current revision that should not be included in the list.pc
- A PageControl for this userpublic DataResult listAlternateFilesForCompare(User user, ConfigFile current, PageControl pc)
user
- The user requesting a list of alternate files.current
- The current file that should not be included in the list.pc
- A PageControl for this userpublic DataResult listChannelsForFileCompare(User user, PageControl pc)
user
- The user requesting a list of channels.pc
- A PageControl for this userpublic DataResult listFilesInChannel(User user, ConfigChannel channel, PageControl pc)
user
- The user requesting a list of files.channel
- The config channelpc
- A page control for the user.public DataResult listSystemsForFileCompare(User user, java.lang.Long cfnid, PageControl pc)
user
- The user requesting a list of systems.cfnid
- The config file name identifier for the file to diff.pc
- A PageControl for this user.public DataResult listSystemsForFileCopy(User user, java.lang.Long cfnid, ConfigChannelType chnlType, PageControl pc)
user
- The user requesting a list of systems.cfnid
- The config file name identifier for the file to diff.chnlType
- ConfigChannelType to look for (LOCAL or SANDBOX)pc
- A PageControl for this user.public DataResult listFileNamesForSsm(User user, PageControl pc)
user
- The user requesting the list of file names.pc
- A PageControl for this user.public DataResult listSystemsForFileName(User user, java.lang.Long cfnid, PageControl pc)
user
- The user requesting a list of systems.cfnid
- The identifier of the config file namepc
- A PageControl for this user.public DataResult listSystemsForConfigChannel(User user, java.lang.Long ccid, PageControl pc)
user
- The user requesting a list of systems.ccid
- The identifier of the config channelpc
- A PageControl for this user.public DataResult listFileNamesInSetForSystem(User user, Server server, PageControl pc)
user
- The user requesting a list of file namesserver
- The server to which these files must be relevantpc
- A PageControl for this userpublic DataResult listFileNamesInSet(User user, Server server, java.lang.String setLabel, PageControl pc)
user
- The user requesting a list of file namesserver
- The server to which these files may be relevantsetLabel
- The DB label of the config file name set.pc
- A PageControl for this userpublic DataResult<ConfigFileNameDto> listAllFileNamesForSystem(Server server)
server
- The server to which these files must be relevantpublic DataResult<ConfigFileNameDto> listFileNamesForSystem(User user, Server server, PageControl pc)
user
- The user requesting a list of file namesserver
- The server to which these files must be relevantpc
- A PageControl for this userpublic DataResult<ConfigFileNameDto> listFileNamesForSystemQuick(User user, Server server, PageControl pc)
user
- The user requesting a list of file namesserver
- The server to which these files must be relevantpc
- A PageControl for this userpublic DataResult<ConfigFileNameDto> listFileNamesForSystemChannel(User user, Server server, ConfigChannel channel, PageControl pc)
user
- The user requesting a list of file namesserver
- The server to which these files must be relevantchannel
- The channel to which these files must be relevantpc
- A PageControl for this userpublic DataResult listConfigChannelsForSystem(User user, Server server, PageControl pc)
user
- The user requesting a list of config channelsserver
- The server subscribed to these channelspc
- A PageControl for this userpublic DataResult<ConfigSystemDto> listSystemsForConfigAction(User user, PageControl pc, java.lang.String feature)
user
- The user requesting the list of file names.pc
- A PageControl for this user.feature
- acl off the list by selecting a config mgmt specific feature
like (configfiles.deploy/configfiles.diff)public DataResult ssmChannelList(User user, PageControl pc)
user
- The user looking at channels.pc
- A page control for this user.public DataResult ssmChannelListForSubscribe(User user, PageControl pc)
ssmChannelListForSubscribeAlreadySubbed(User)
user
- The user looking at channels.pc
- A page control for this user.ConfigChannelDto
objectspublic DataResult ssmChannelListForSubscribeAlreadySubbed(User user)
ssmChannelListForSubscribe(User, PageControl)
.user
- the user working with the channelsConfigChannelDto
objectspublic java.util.List ssmChannelsInSetForSubscribe(User user)
user
- The user looking at channels.public java.util.List ssmSystemsForSubscribe(User user)
user
- The user looking at channels.public DataResult ssmSystemListForChannels(User user, PageControl pc)
user
- The user requested a list of systemspc
- A PageControl for this userpublic DataResult getEnableSummary(User user, PageControl pc, java.lang.String set)
user
- The user asking for a summarypc
- A PageControl object for this user.set
- The label for the RhnSet where the summary is located.public DataResult listGlobalConfigFiles(User user, PageControl pc)
user
- The user requesting to view config filespc
- A page control for this user.public DataResult listLocalConfigFiles(User user, PageControl pc)
user
- The user requesting to view config filespc
- A page control for this user.public DataResult listChannelsForFileCopy(User user, ConfigFile current, java.lang.String type, PageControl pc)
user
- The user requesting to view config filescurrent
- The file to be copied for which we should look for
alternatives in the listed channels.
The list will exclude the channel that this file is in.type
- The database type for the channel.
A label from ConfigurationFactory.CONFIG_CHANNEL_TYPE_*pc
- A page control for this user.public java.util.List listChannelsForCopy(User user, ConfigChannel cc, java.lang.String ccType)
user
- user making the requestcc
- config-channel of interestccType
- channel-type of interestpublic DataResult listSystemsForCopy(User user, PageControl pc)
user
- user making the requestpc
- page-controlpublic int getSystemCount(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic int getFileStorage(User user, ConfigFile file)
user
- User making the requestfile
- File of interestpublic int getSymlinkCount(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic int getDirCount(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic int getFileCount(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic DataResult getSystemInfo(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic DataResult getFileInfo(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic DataResult getRecentlyModifiedConfigFiles(User user, java.lang.Integer results)
user
- The user listing filesresults
- The number of files to listpublic DataResult getRecentConfigDeployActions(User user, java.lang.Integer results)
user
- The user listing deploy actionsresults
- The number of actions to listpublic ChannelSummary getChannelSummary(User user, ConfigChannel channel)
user
- user making the requestchannel
- channel of interestpublic DataResult<ConfigFileDto> listCurrentFiles(User user, ConfigChannel channel, PageControl pc)
user
- user making the requestchannel
- channel of interestpc
- pagination control (if any)public DataResult listCurrentFiles(User user, ConfigChannel channel, PageControl pc, java.lang.String setLabel)
user
- user making the requestchannel
- channel of interestpc
- controller/elaborator for the listsetLabel
- label of set we care about, or NULL if we don't want to use a setpublic DataResult<ConfigRevisionDto> listRevisionsForFile(User user, ConfigFile file, PageControl pc)
user
- user making the requestfile
- config file for which we are listing revisionspc
- controller/elaborator for the listpublic DataResult listChannelSystems(User user, ConfigChannel channel, PageControl pc)
user
- user making the requestchannel
- channel of interestpc
- controller/elaborator for the listpublic DataResult listChannelsForSystem(User user, Server server, PageControl pc)
user
- The user requesting for a list of config channelsserver
- The server subscribed to the config channelspc
- A PageControl for this userpublic java.util.Map getOverviewSummary(User user)
user
- The user requesting informationpublic DataResult listSystemsNotInChannel(User user, ConfigChannel channel, PageControl pc)
user
- user making the requestchannel
- channel of interestpc
- controller/elaborator for the listpublic void deleteConfigChannel(User user, ConfigChannel channel)
user
- The user requesting to delete the channelchannel
- The channel to be deleted.java.lang.IllegalArgumentException
- if user is not allowed to delete this
config channel (different org or not config admin).public ConfigRevision createNewRevision(User user, java.io.InputStream input, java.lang.Long cfid, java.lang.Long size)
user
- The user requesting to create the revisioninput
- The stream containing the revision's contentcfid
- The identifier for the parent config file.size
- The size of the given input streampublic ConfigRevision createNewRevision(User user, java.io.InputStream input, ConfigFile file, java.lang.Long size)
user
- The user requesting to create the revisioninput
- The stream containing the revision's contentfile
- The parent config file.size
- The size of the given input streampublic boolean deleteConfigRevision(User user, ConfigRevision revision)
user
- The user requesting to delete the revisionrevision
- The revision to be deleted.java.lang.IllegalArgumentException
- if user is not allowed to delete this
config revision (different org or not config admin).public void deleteConfigFile(User user, ConfigFile file)
user
- The user requesting to delete the filefile
- The file to be deleted.java.lang.IllegalArgumentException
- if user is not allowed to delete this
config file (different org or not config admin).public void copyConfigFile(ConfigRevision revision, ConfigChannel channel, User user)
revision
- The revision of the file to be copied.channel
- The channel to which to copy.user
- The user requesting to copy the filejava.lang.IllegalArgumentException
- if user is not allowed to copy this
config file (different org or not config admin).public DataResult getSuccesfulDeploysTo(User usr, ConfigFileName cfn, Server srv)
usr
- User making the requestcfn
- name of interestsrv
- server of interestpublic DataResult listFilesNotInChannel(User usr, ConfigChannel cc, PageControl pc)
usr
- User making the requestcc
- ConfigChannel of interestpc
- A page control for this user.public DataResult listSystemInfoForChannel(User usr, ConfigChannel cc, PageControl pc)
usr
- User making the requestcc
- ConfigChannel of interestpc
- PageControl (if we're paginating)public DataResult listSystemInfoForChannel(User usr, ConfigChannel cc, PageControl pc, boolean useSet)
usr
- User making the requestcc
- ConfigChannel of interestpc
- PageControl (if we're paginating)useSet
- true if we should limit by set_label, false if we want ALL systems
in the channelpublic java.util.List<? extends ConfigFileNameDto> listManagedPathsFor(Server server, User user, ConfigChannelType type)
server
- the server who's paths are to be retrieveduser
- the user needed for permission checkingtype
- config channel type that holds the filespublic ConfigFileCount countAllActionPaths(Server server, Action action)
server
- The server for whom the count of files
is desired.action
- the action for whom the number of files
and dirs are desired.public ConfigFileCount countSuccessfulCompares(Server server, Action action)
server
- The server for whom the count of files
is desired.action
- the action for whom the number of files
and dirs are desired.public ConfigFileCount countDifferingPaths(Server server, Action action)
server
- The server for whom the count of files
is desired.action
- the action for whom the number of files
and dirs are desired.public ConfigFileCount countLocallyManagedPaths(Server server, User user, ConfigChannelType cct)
server
- The server for whom the count of files
is desired.user
- The user required for permission purposescct
- The local channel type of the to look at (local/sandbox)public ConfigFileCount countCentrallyManagedPaths(Server server, User user)
server
- The server for whom the count of files
is desired.user
- The user required for permission purposespublic ConfigFileCount countCentrallyDeployablePaths(Server server, User user)
server
- The server for whom the count of files
is desired.user
- The user required for permission purposespublic ConfigChannel lookupConfigChannel(User user, java.lang.Long id)
user
- The user requesting to lookup a config channel.id
- The identifier for the config channelpublic ConfigChannel lookupConfigChannel(User user, java.lang.String label, ConfigChannelType cct)
user
- The user requesting to lookup a config channel.label
- The label for the ConfigChannelcct
- the config channel type of the config channel.public ConfigFile lookupConfigFile(User user, java.lang.Long id)
user
- The user requesting to lookup a config file.id
- The identifier for the config file.public ConfigFile lookupConfigFile(User user, java.lang.Long ccid, java.lang.String path)
user
- User making the requestccid
- ID of tyhe cohnfig-channel of interestpath
- file-path of interestpublic ConfigRevision lookupConfigRevision(User user, java.lang.Long id)
user
- The user requesting to lookup a config revision.id
- The identifier for the config revision.public ConfigRevision lookupConfigRevisionByRevId(User user, ConfigFile cf, java.lang.Long revId)
user
- The user requesting to lookup a config revision.cf
- The ConfigFile that the revision applies torevId
- The ConfigFile revision id.public java.util.List lookupConfigRevisions(ConfigFile cf)
cf
- ConfigFile to lookup the revision for.public boolean accessToChannel(java.lang.Long uid, java.lang.Long ccid)
uid
- The user idccid
- The config channel idpublic java.lang.Long getDeployableRevisionForFileName(java.lang.Long cfnid, java.lang.Long sid)
cfnid
- The config file name idsid
- The server idpublic void enableSystems(RhnSetDecl set, User user, java.util.Date earliest)
set
- The set that contains systems selected for enablementuser
- The user requesting to enable systemsearliest
- The earliest time package actions will be scheduled.public DataResult<ConfigGlobalDeployDto> listGlobalFileDeployInfo(User usr, ConfigChannel cc, ConfigFile cf, PageControl pc)
usr
- logged-in usercc
- cfg-channel of interestcf
- cfg=file of interestpc
- paging control for UI controlpublic DataResult<ConfigGlobalDeployDto> listGlobalFileDeployInfo(User usr, ConfigChannel cc, ConfigFile cf, PageControl pc, java.lang.String setLabel)
usr
- User making the requestcc
- Config Channel File is incf
- ConfigFile of interestpc
- page-control for UI pagingsetLabel
- label of limiting set, or NULL if not set-limitedpublic void deployConfiguration(User user, java.util.Collection<Server> servers, java.util.Date datePicked)
user
- User needed for authentication purposes..servers
- The list of servers, to whom the deploy action
needs to be scheduleddatePicked
- date to deploy or null for the earliest datepublic void deployConfiguration(User user, java.util.Collection<Server> servers, ConfigChannel channel, java.util.Date datePicked)
user
- User needed for authentication purposes..servers
- The list of servers, to whom the deploy action
needs to be scheduledchannel
- ConfigChannel to deploy files fromdatePicked
- date to deploy or null for the earliest datepublic java.util.Map deployFiles(User usr, java.util.Set fileIds, java.util.Set systemIds, java.util.Date datePicked)
usr
- User requesting the deployfileIds
- Revisions to be deployedsystemIds
- Systems to deploy todatePicked
- Date to schedule the deploy forpublic java.util.Map deployFiles(User usr, java.util.Set fileIds, java.util.Set systemIds, java.util.Date datePicked, ActionChain actionChain)
usr
- User requesting the deployfileIds
- Revisions to be deployedsystemIds
- Systems to deploy todatePicked
- Date to schedule the deploy foractionChain
- the action chain to add the action to or nullpublic void ensureConfigManageable(Server server)
server
- the server to check.public java.lang.Long getServerIdFor(ConfigChannel cc, User user)
cc
- the local or sandbox channeluser
- the logged in user.public boolean isDuplicated(java.lang.String label, ConfigChannelType cct, Org org)
label
- Label of the config channelcct
- the contig channel typeorg
- the org of the current userpublic static DataResult systemSnapshotConfigChannels(java.lang.Long sid, java.lang.Long ssid, PageControl pc)
sid
- server IDssid
- snapshot IDpc
- page controlpublic static DataResult systemSnapshotConfigFiles(java.lang.Long ssid, PageControl pc)
ssid
- snapshot IDpc
- page control