public class ConfigChannelHandler extends BaseHandler
VALID
Constructor and Description |
---|
ConfigChannelHandler() |
Modifier and Type | Method and Description |
---|---|
int |
channelExists(User loggedInUser,
java.lang.String channelLabel)
Check for the existence of the config channel provided.
|
ConfigChannel |
create(User loggedInUser,
java.lang.String label,
java.lang.String name,
java.lang.String description)
Creates a new global config channel based on the values provided..
|
ConfigRevision |
createOrUpdatePath(User loggedInUser,
java.lang.String channelLabel,
java.lang.String path,
boolean isDir,
java.util.Map<java.lang.String,java.lang.Object> data)
Creates a NEW path(file/directory) with the given path or updates an existing path
with the given contents in a given channel.
|
ConfigRevision |
createOrUpdateSymlink(User loggedInUser,
java.lang.String channelLabel,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> data)
Creates a NEW symbolic link with the given path or updates an existing path
with the given target_path in a given channel.
|
int |
deleteChannels(User loggedInUser,
java.util.List<java.lang.String> channelLabels)
Deletes a list of global channels..
|
int |
deleteFileRevisions(User loggedInUser,
java.lang.String configChannelLabel,
java.lang.String filePath,
java.util.List<java.lang.Integer> revisions)
Delete specified revisions of a given configuration file
|
int |
deleteFiles(User loggedInUser,
java.lang.String channelLabel,
java.util.List<java.lang.String> paths)
Removes a list of paths from a global channel..
|
int |
deployAllSystems(User loggedInUser,
java.lang.String channelLabel)
Schedule a configuration deployment for all systems in a config channel immediately
|
int |
deployAllSystems(User loggedInUser,
java.lang.String channelLabel,
java.util.Date date)
Schedule a configuration deployment for all systems in a config channel
|
int |
deployAllSystems(User loggedInUser,
java.lang.String channelLabel,
java.lang.String filePath) |
int |
deployAllSystems(User loggedInUser,
java.lang.String channelLabel,
java.lang.String filePath,
java.util.Date date) |
ConfigChannel |
getDetails(User loggedInUser,
java.lang.Integer configChannelId)
Return a struct of config channel details.
|
ConfigChannel |
getDetails(User loggedInUser,
java.lang.String configChannelLabel)
Return a struct of config channel details.
|
EncodedConfigRevision |
getEncodedFileRevision(User loggedInUser,
java.lang.String configChannelLabel,
java.lang.String filePath,
java.lang.Integer revision)
Get base64 encoded revision for specified config file
|
ConfigRevision |
getFileRevision(User loggedInUser,
java.lang.String configChannelLabel,
java.lang.String filePath,
java.lang.Integer revision)
Get revision for specified config file
|
java.util.List |
getFileRevisions(User loggedInUser,
java.lang.String configChannelLabel,
java.lang.String filePath)
Get list of revisions for specified config file
|
java.util.List<ConfigFileDto> |
listFiles(User loggedInUser,
java.lang.String channelLabel)
List files in a given channel
|
java.util.List<ConfigChannelDto> |
listGlobals(User loggedInUser)
List all the global channels accessible to the logged-in user
|
java.util.List<ConfigSystemDto> |
listSubscribedSystems(User loggedInUser,
java.lang.String channelLabel)
List the systems subscribed to a configuration channel
|
java.util.List<ConfigChannel> |
lookupChannelInfo(User loggedInUser,
java.util.List<java.lang.String> labels)
Lists details on a list channels given their channel labels.
|
java.util.List<ConfigRevision> |
lookupFileInfo(User loggedInUser,
java.lang.String channelLabel,
java.util.List<java.lang.String> paths)
Given a list of paths and a channel the method returns details about the latest
revisions of the paths.
|
ConfigRevision |
lookupFileInfo(User loggedInUser,
java.lang.String channelLabel,
java.lang.String path,
java.lang.Integer revision)
Given a path and revision number, return the revision
|
java.lang.Integer |
scheduleFileComparisons(User loggedInUser,
java.lang.String channelLabel,
java.lang.String path,
java.util.List<java.lang.Integer> serverIds)
Schedule a comparison of the latest revision of a file
against the version deployed on a list of systems.
|
ConfigChannel |
update(User loggedInUser,
java.lang.String label,
java.lang.String name,
java.lang.String description)
Updates a global config channel based on the values provided..
|
ensureConfigAdmin, ensureOrgAdmin, ensureOrgOrConfigAdmin, ensureSatAdmin, ensureSystemGroupAdmin, ensureUserRole, getLoggedInUser, invoke, providesAuthentication, setEntityAttribute, validateClientCertificate, validateEntitlements, validateMap, verifyOrgExists
public ConfigChannel create(User loggedInUser, java.lang.String label, java.lang.String name, java.lang.String description)
loggedInUser
- The current userlabel
- label of the config channelname
- name of the config channeldescription
- description of the config channelpublic int deleteFileRevisions(User loggedInUser, java.lang.String configChannelLabel, java.lang.String filePath, java.util.List<java.lang.Integer> revisions)
loggedInUser
- The current userconfigChannelLabel
- Config channel label.filePath
- The configuration file path.revisions
- List of configuration file revisions to delete.public java.util.List getFileRevisions(User loggedInUser, java.lang.String configChannelLabel, java.lang.String filePath)
loggedInUser
- The current userconfigChannelLabel
- Config channel label.filePath
- The configuration file path.public ConfigRevision getFileRevision(User loggedInUser, java.lang.String configChannelLabel, java.lang.String filePath, java.lang.Integer revision)
loggedInUser
- The current userconfigChannelLabel
- Config channel label.filePath
- The configuration file path.revision
- The configuration file revision.public EncodedConfigRevision getEncodedFileRevision(User loggedInUser, java.lang.String configChannelLabel, java.lang.String filePath, java.lang.Integer revision)
loggedInUser
- The current userconfigChannelLabel
- Config channel label.filePath
- The configuration file path.revision
- The configuration file revision.public ConfigChannel getDetails(User loggedInUser, java.lang.String configChannelLabel)
loggedInUser
- The current userconfigChannelLabel
- Config channel label.public ConfigChannel getDetails(User loggedInUser, java.lang.Integer configChannelId)
loggedInUser
- The current userconfigChannelId
- Config channel ID.public ConfigChannel update(User loggedInUser, java.lang.String label, java.lang.String name, java.lang.String description)
loggedInUser
- The current userlabel
- label of the config channelname
- name of the config channeldescription
- description of the config channelpublic java.util.List<ConfigChannel> lookupChannelInfo(User loggedInUser, java.util.List<java.lang.String> labels)
loggedInUser
- The current userlabels
- the list of channel labels to lookup onpublic java.util.List<ConfigChannelDto> listGlobals(User loggedInUser)
loggedInUser
- The current userpublic ConfigRevision createOrUpdatePath(User loggedInUser, java.lang.String channelLabel, java.lang.String path, boolean isDir, java.util.Map<java.lang.String,java.lang.Object> data)
loggedInUser
- The current userchannelLabel
- the label of the config channel.path
- the path of the given text file.isDir
- true if this is a directory path, false if its to be a file pathdata
- a map containing properties pertaining to the given path..
for directory paths - 'data' will hold values for ->
owner, group, permissions
for file paths - 'data' will hold values for->
contents, owner, group, permissions, macro-start-delimiter, macro-end-delimiterpublic ConfigRevision createOrUpdateSymlink(User loggedInUser, java.lang.String channelLabel, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> data)
loggedInUser
- The current userchannelLabel
- the label of the config channel.path
- the path of the given text file.data
- a map containing properties pertaining to the given path..
'data' will hold values for ->
target_paths, selinux_ctxpublic java.util.List<ConfigRevision> lookupFileInfo(User loggedInUser, java.lang.String channelLabel, java.util.List<java.lang.String> paths)
loggedInUser
- The current userchannelLabel
- the channel labelpaths
- a list of paths to examine.public ConfigRevision lookupFileInfo(User loggedInUser, java.lang.String channelLabel, java.lang.String path, java.lang.Integer revision)
loggedInUser
- The current userchannelLabel
- the channel labelpath
- path to examine.revision
- the revision to fetchpublic java.util.List<ConfigFileDto> listFiles(User loggedInUser, java.lang.String channelLabel)
loggedInUser
- The current userchannelLabel
- the label of the config channelpublic int deleteChannels(User loggedInUser, java.util.List<java.lang.String> channelLabels)
loggedInUser
- The current user
keychannelLabels
- the the list of global channels.public int deleteFiles(User loggedInUser, java.lang.String channelLabel, java.util.List<java.lang.String> paths)
loggedInUser
- The current userchannelLabel
- the channel to remove the files from..paths
- the list of paths to delete.public java.lang.Integer scheduleFileComparisons(User loggedInUser, java.lang.String channelLabel, java.lang.String path, java.util.List<java.lang.Integer> serverIds)
loggedInUser
- The current userchannelLabel
- label of the config channelpath
- the path of file to be comparedserverIds
- the list of server ids that the comparison will be
performed onpublic int channelExists(User loggedInUser, java.lang.String channelLabel)
loggedInUser
- The current userchannelLabel
- the channel to check for.public int deployAllSystems(User loggedInUser, java.lang.String channelLabel)
loggedInUser
- The current userchannelLabel
- the channel to remove the files from..public int deployAllSystems(User loggedInUser, java.lang.String channelLabel, java.util.Date date)
loggedInUser
- The current userchannelLabel
- the channel to remove the files from..date
- the date to schedulepublic int deployAllSystems(User loggedInUser, java.lang.String channelLabel, java.lang.String filePath)
loggedInUser
- The current userchannelLabel
- the channel to deploy the files from..filePath
- config file pathpublic int deployAllSystems(User loggedInUser, java.lang.String channelLabel, java.lang.String filePath, java.util.Date date)
loggedInUser
- The current userchannelLabel
- the channel to deploy the files from..filePath
- config file pathdate
- the date to schedulepublic java.util.List<ConfigSystemDto> listSubscribedSystems(User loggedInUser, java.lang.String channelLabel)
loggedInUser
- The current userchannelLabel
- the label of the config channel